随笔分类 - SQL学习
摘要:exec sp_helptext is_student2create view Is_student2asSelect sno,sname,sage from studentwhere sdept = '信息系'with check option/*建立信息系选修了c01号课程的学生的视图(包括学号
阅读全文
摘要:/*注意数据库是不是本数据库!!!!!!!!*/--查询非计算机科学系中比计算机科学系任意一个学生年龄小的学生姓名和年龄Select Sname, Sage From Student Where Sage < any (Select Sage From Student Where Sdept = '
阅读全文
摘要:Select * from studentSelect Sname from studentSelect * From student where ssex = '男'select * from sc where grade is not null order by grade descselect
阅读全文
摘要:--基本查询语句select * from Studentselect * from SCselect * from Course--建立索引--为学生-课程数据库中的Student,Course,SC三个表建立索引.Student表按学号升序建立唯一索引,Course表按课程号升序建立为一索引--
阅读全文
摘要:--检查是否正常导入三个表Select * From StudentSelect * From CourseSelect * From SC--查询第二个字是立的同学信息Select * From Student Where Sname like '_立_';--查询所有不姓张的同学的姓名、学号和性
阅读全文
摘要:实现工具SQL Server2008 R2 连接本地数据后新建一个数据库 以后每次学习中都需要导入三个表 creat_Table 表: https://cqc-download.ftn.qq.com/ftn_handler/833fe0d3315753f38cf6e845aef56b56556964
阅读全文