猿问
下载APP

请问该如何将tni_index索引更名为teacher_index用sql语句怎么写?

将tni_index索引更名为teacher_index用sql语句怎么写?


守着星空守着你
浏览 62回答 6
6回答

守着一只汪

一个student表student表包含三个字段的学生的ID(stu_id)学生姓名(stu_name),当然ID(les_id)“CREATE TABLE [dbo的]。学生(/ stu_id。的uniqueidentifier] NOT&nbsp;NULL,stu_name [数据类型为nvarchar](425)NOT&nbsp;NULL,les_id [为uniqueidentifier] NOT&nbsp;NULL)第二个表中的课程课,有两个字段,当然的ID(les_id)的和课程名称(les_name)CREATE TABLE [dbo的课(les_id的uniqueidentifier] NOT NULL,les_name [数据类型为nvarchar](425)NOT NULL)< /第三个表,学生表的分数,三场场ID(les_id)的学生证(stu_id)和课程成绩(les_score)创建表[DBO]。分数(les_id的uniqueidentifier] NULL,stu_id的唯一标识符NOT NULL,les_score [INT] NOT NULL)

HUWWW

sqlserver:--更改索引名: old_indName 改为 new_indName1sp_rename&nbsp;'tabName.old_indName','new_indName','INDEX'oracle的语法:1ALTER&nbsp;INDEX&nbsp;employee_idx&nbsp;RENAME&nbsp;TO&nbsp;employee_index_Newname;Mysql:For MySQL 5.7:1ALTER&nbsp;TABLE&nbsp;tbl_name&nbsp;RENAME&nbsp;INDEX&nbsp;old_index_name&nbsp;TO&nbsp;new_index_nameFor MySQL older versions:1ALTER&nbsp;TABLE&nbsp;tbl_name&nbsp;DROP&nbsp;INDEX&nbsp;old_index_name,&nbsp;ADD&nbsp;INDEX&nbsp;new_index_name&nbsp;(...)

慕的地2183247

后面要加上表名格式是这样drop&nbsp;&nbsp;index&nbsp;&nbsp;&nbsp;&nbsp;索引名&nbsp;&nbsp;&nbsp;on&nbsp;&nbsp;&nbsp;&nbsp;表名

HUH函数

1. select * from&nbsp;SC2. select Sname,Sage from Student where Sdept = '计算机'3. select Sno,Cno,Grade from&nbsp;SC&nbsp;where Grade >= 70 and Grade <= 804. select Sname,Sage from Student where Sage between 18 and 20 and Ssex = '男'5. select top 1 Grade from&nbsp;SC&nbsp;where Cno = 'C01'6. select max(Sage),min(Sage) from Student7. select Sdept,sum(Sno) from Student group by Sdept8. select course.Cname,sum(sc.Sno),max(Grade) from SCjoin studet on Student.Sno = SC.Snojoin Course on Course.Cno = SC.Cnogroup by course.cname,max(grade)9. select sum(Cno),avg(Grade) from SCjoin Course on Course.Cno = SC.Cnojoin Student on Student.Sno= SC.Snoorder by SC.Sno10. select Stuent.Sno,Stuent.Sname,sum(Grade) A from SCjoin Student on Student.Sno = SC.Snogroup by sc.Sno,student.Snamehaving A > 20011. select Student.Sname,Student.Sdept from Studentjoin Course on Course.Cno = SC.Cnojoin SC on SC.Sno = Student.Snowhere SC.Cno = 'C02'12. select Student.sname,course.cno,sc.grade from scjoin student on student.sno = sc.snojoin course on course.cno = sc.cnowhere sc.grade >= 80order by sc.grade desc13. select cno,cname from(select course.cno,course.cname,sun(sno) from studentjoin course on course.cno = sc.cnojoin sc on sc.sno = student.snogroup by cno,cnamehaving&nbsp;sun(sno) > 0)14. ① select student.sname,student.sdept from(select student.sname,student.sdept,course.cname from studentjoin sc on sc.sno = student.snojoin course on course.cno = sc.cnowhere course.cname = 'C01')② select student.sno,student.sname from(select student.sno,student.sname,student.sdept,sc.grade from scjoin student on student.sno = sc,snowhere student.sdept = '信息' and sc.grade >= 80)③ select top 1 student.sname from(select student.sname,student.sdept,sum(sc.grade) from scjoin student on student.sno = sc.snowhere student.sdept = '计算机'group by student.sname,student.sdeptorder by)15. delete from sc where grade < 5016. update sc set grade += 5 from scjoin course on course.cno = sc.cnjoin student on student.sno = sc.snowhere student.sno =(select student.sno from scjoin course on course.cno = sc.cnowhere course.cname = 'c01')17. update sc set grade += 10 from scjoin student on student.sno = sc.snowhere student.sno =(select student.sno from studentjoin sc on sc.sno = student.snojoin course on course.cno = sc.cnowhere student.sdept = '计算机' and course.cname = '计算机文化基础')18. create view [A] asselect student.sno,student.sname,student.sdept,course.cno,course.cname,sc.grade from scjoin student on student.sno = sc.snojoin course on course.cno = sc.cno19. create view [A] asselect student.sno,avg(sc.grade) from scjoin student on student.sno = sc.snogroup by student.sno20. create view [A] asselect student.sno,sum(sc.grade) from scjoin student on student.sno = sc.snogroup by student.sno21. create index A on student(sname)22. 不会

幕布斯5086720

select * from courseselect Sname,Sage from Student where sdept = '计算机系'select * from sc where 70 <= grade and grade =>80select Sname,Sage from Student where sdept = '计算机系' and Ssex='男'

九州编程

1,select&nbsp;*&nbsp;from 2,select&nbsp;sname,sage&nbsp;from&nbsp;student&nbsp;where&nbsp;sdept&nbsp;=&nbsp;'计算机系' 3,select&nbsp;*&nbsp;from&nbsp;sc&nbsp;where&nbsp;70&nbsp;<=&nbsp;grade&nbsp;and&nbsp;grade&nbsp;=>80 写不下去了,你就这样的格式,select&nbsp;(要查询的字段名)&nbsp;from&nbsp;(表名)&nbsp;where&nbsp;(查询条件),,,,很简单的,,
打开App,查看更多内容
随时随地看视频慕课网APP
我要回答