sql语句练习软件formac.docVIP

  • 173
  • 0
  • 约1.9万字
  • 约 28页
  • 2017-05-12 发布于贵州
  • 举报
sql语句练习软件formac

sql语句练习软件formac 篇一:sql语句练习题及答案 一 在数据库 school 中建立student , sc, course 表。 学生表、课程表、选课表属于数据库 School ,其各自的数据结构如下: 学生 Student (Sno,Sname,Ssex,Sage,Sdept) 课程表 course(Cno,Cname,Cpno,Ccredit) 学生选课 SC(Sno,Cno,Grade) 二 设定主码 1 Student表的主码:sno2 Course表的主码:cno 3 Sc表的主码:sno,cno 1写出使用 Create Table 语句创建表 student , sc, course 的SQL语句 2 3 删除student表中的元组 4在数据库school中删除关系student 5在student表添加属性sbirthdate 类型 datetime Delete 1 删除所有 JSJ 系的男生 delete from Student where Sdept=JSJ’ and Ssex=’男; 2 删除“数据库原理”的课的选课纪录 delete from SC where Cno in (select Cno fromCourse where Cname=数据库原理); Update 1 修改 000

文档评论(0)

1亿VIP精品文档

相关文档