资源描述:
《练习_20110513》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、姓名:师东青NotveryspecialItistheonly【实验名称】SDQ查询使用【实验拓扑】【实验步骤】一、建数据库jwgl代码:createdatabasejwgl二、新建数据表student代码:createtablestudent(姓名:师东青NotveryspecialItistheonlystudent_idchar(10)primarykey,student_namenchar(10)notnull,sexintnotnull,ageintnotnull,birthnchar(10)notnu
2、ll,class_idnchar(10)notnull,enteance_datenchar(10)notnull,home_addrnchar(30),)insertintostudentvalues('g940210','张虹',1,15,'1984-9-1','g9902','1999-9-1','南京市鼓楼区平岗3号')insertintostudentvalues('g940212','林红',0,22,'1984-6-1','g9901','1999-9-1','南京市鼓楼区平岗3号')inserti
3、ntostudentvalues('g940213','曹雨',1,21,'1983-12-1','g9902','1999-9-1','南京市鼓楼区平岗3号')insertintostudentvalues('g940214','苪华',1,18,'1984-9-1','g9901','1999-9-1','南京市鼓楼区平岗3号')insertintostudentvalues('g940215','李红【大】',0,17,'1983-9-9','g9902','1999-9-1','南京市鼓楼区平岗3号')i
4、nsertintostudentvalues('g940216','李红【小】',0,22,'1984-9-8','g9901','1999-9-1','南京市鼓楼区平岗3号')insertintostudentvalues('g940217','赵青',1,19,'1985-9-9','g9902','1999-9-1','南京市鼓楼区平岗3号')insertintostudent(student_id,student_name,sex,age,birth,class_id,enteance_date)valu
5、es('g940218','林海',1,16,'1985-10-9','g9901','1999-9-1','NULL')姓名:师东青NotveryspecialItistheonly新建数据表class_info代码:姓名:师东青NotveryspecialItistheonlycreatetableclass_info(class_idnchar(10)primarykey,class_namenchar(20),)insertintoclass_infovalues('g9901','网页一班')inser
6、tintoclass_infovalues('g9902','网页二班')insertintoclass_infovalues('g9903','网页三班')建数据表course代码:createtablecourse(class_idnchar(10),student_idnchar(10),gradeint)insertintocoursevalues('1','g940210',60)insertintocoursevalues('2','g940212',90)姓名:师东青NotveryspecialIt
7、istheonlyinsertintocoursevalues('1','g940213',87)insertintocoursevalues('2','g940210',88)insertintocoursevalues('3','g940210',98)select*fromcourse建数据表course_info代码:createtablecourse_info(courseidint,coursenamenchar(10),)insertintocourse_infovalues(1,'flash')i
8、nsertintocourse_infovalues(2,'fireworks')insertintocourse_infovalues(3,'ps')select*fromcourse_info)select*fromcourse_info姓名:师东青NotveryspecialItistheonly三、对student表做如下操作1、插入一条学生记录,student_