6 回答
TA贡献1836条经验 获得超5个赞
一个student表student表包含三个字段的学生的ID(stu_id)学生姓名(stu_name),当然ID(les_id)
“CREATE TABLE [dbo的]。学生(/ stu_id。的uniqueidentifier] NOT NULL,
stu_name [数据类型为nvarchar](425)NOT NULL,
les_id [为uniqueidentifier] NOT 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
)
TA贡献1827条经验 获得超7个赞
sqlserver:
--更改索引名: old_indName 改为 new_indName
1 | sp_rename 'tabName.old_indName' , 'new_indName' , 'INDEX' |
oracle的语法:
1 | ALTER INDEX employee_idx RENAME TO employee_index_Newname; |
Mysql:
For MySQL 5.7:
1 | ALTER TABLE tbl_name RENAME INDEX old_index_name TO new_index_name |
For MySQL older versions:
1 | ALTER TABLE tbl_name DROP INDEX old_index_name, ADD INDEX new_index_name (...) |
TA贡献1878条经验 获得超4个赞
select * from course
select Sname,Sage from Student where sdept = '计算机系'
select * from sc where 70 <= grade and grade =>80
select Sname,Sage from Student where sdept = '计算机系' and Ssex='男'
TA贡献1951条经验 获得超3个赞
1,select * from 2,select sname,sage from student where sdept = '计算机系' 3,select * from sc where 70 <= grade and grade =>80 写不下去了,你就这样的格式,select (要查询的字段名) from (表名) where (查询条件),,,,很简单的,,
添加回答
举报