数据库SQL语言实习

上传人:m**** 文档编号:468944429 上传时间:2022-11-30 格式:DOC 页数:26 大小:660KB
返回 下载 相关 举报
数据库SQL语言实习_第1页
第1页 / 共26页
数据库SQL语言实习_第2页
第2页 / 共26页
数据库SQL语言实习_第3页
第3页 / 共26页
数据库SQL语言实习_第4页
第4页 / 共26页
数据库SQL语言实习_第5页
第5页 / 共26页
点击查看更多>>
资源描述

《数据库SQL语言实习》由会员分享,可在线阅读,更多相关《数据库SQL语言实习(26页珍藏版)》请在金锄头文库上搜索。

1、 数据库上机实习报告 实 验 名 称:数据库和数据表操作实验实验环境:Win10ieri7-550U GHZ +内存4.0GMwre虚拟in系统 Ocle11g + avicat 11月13 日1. 分别采用 U 界面和 SQL语言为 Uiversity 的 Deartment表输入下列数据: 输入SQ语言代码为:*系的信息表 Depatment(Dn,ame,addres)*/reate tale Deprment(Dno nuber(10),nme varc2(0),address varchar(5),prmar ky (Dno));insetito Departent(n,name,D

2、adres)vales(1,地球科学学院,主楼东);sert inoeparmt(no,Dname,Dddress) values(2,资源学院,主楼西);iser into Depet(Dno,Dame,Ddess)valus(,材化学院,材化楼);insert into Deprtment(Dno,Dname,Dadress) lue(,环境学院,文华楼);nertintoDprtet(D,Dna,adres) alues(5,工程学院,水工楼);nsrtto Dpamet(Do,nme,Dddress) lus(,地球物理与空间信息学院,物探楼);inset into Darent(Do

3、,nme,Daddrss) values(,机械与电子信息学院,教二楼);insertinoDepartmet(Dno,Dname,Dadres) vales(8,经济管理学院,经管楼);sertit Dpartmt(Dn,Dnae,Daddres) vaus(,外语学院,北一楼);iseintoDepartmnt(Do,Dname) a(1,信息工程学院);inse intDertment(Dn,Dam,Dadress) valu(1,数学与物理学院,基委楼);inser into Dpartment(Dno,Dame,Dadress)vles(12,珠宝学院,珠宝楼);ier nto De

4、partmnt(Dno,nam,Dadrss) vales(13,政法学院,政法楼);insertinto Deatmnt(Dno,Dne,Dares) valus(,计算机学院,北一楼);nsert into Departmen(,Dname) valus(,远程与继续教育学院);nser ito eatment(Do,Dname) valu(16,国际教育学院);nser ntoDepmen(Dno,Dna,Dadress) alu(17,体育部,体育馆);ier into partnt(Dno,Dnme,address) val(8,艺术与传媒学院,艺传楼);insert itDpart

5、men(Do,name,Daddress) value(9,马克思主义学院,保卫楼);insrt in Departm(Do,Dname,Dadrss) lue(0,江城学院,江城校区);运营成果为:2. 用SQL 语言为 Univst 的tent表输入下列数据: 输入Q语言代码为:/学生信息表Sudnt(Sn,me, Ssx, Sage, D)*/cet tablStdent(Sno cha(11) ,Same rchar2 (50),Sex char(2),Sgenuer(1),Dno number(10),rmarykey (Sn),oreignkey (Dno) efrenesDepa

6、rtmen(Dno));inser ino Stuen(Sno, Snm, Ssx, Sage, Dn) values(100023,吕岩,8,14);inset inoStdent(Sno, Snae, Se,Sge, Dno)value(1004391,颜荣,M,1,14);nert intoStudent(Sno,Sne, Ssex, age,Dno) values(01598,王海涛,0,14);isertino Studn(no, ame, Ssx, Se, o) les(10038,袁恒,M,18,1);set to Suet(Sno, Sname, Se, Sae,n) vale

7、(100086,孟飞,M,7,14);insertinoStudet(Sno, Sname, Se,Sage, Dn) vles(10093,罗振俊,M,19,8);insert inoStudent(Sn, nam, S, age, Do) vaues(001,曾雪君,F,,);isrtinoStudent(n, Snae, Ssex, Sag, D) vlues(000983,巴翔,M,19,8);nsert int Stent(Sno,Snme, ex,Sg, no)vlus(1017,周雷,M,8,8);insert it tdnt(So,Snae, Sex, Sag,)vaues(1

8、0026,马欢,M,17,8);insert itoStuent(no, Sname, Ssex, Sge, o) valu(184,陈亮,M,20,);insert intoStuent(Sn,Snme,Ssx, Sage, Dno)lue(10042,易家新,,5);insert in Sudet(Sno, Snm, se, age,no) aues(107,李子聪,1,5);insetinttudnt(Sno, Sae, Ssex,Sage, Dn)vaue(100266,蔡景学,F,19,5);insert int Student(So, Sme,Ssx, Sag,Dn)vales(1

9、0188,赵林云,F,0,);iner into Studnt(Sno,Sname,Ssex, Sae, Dno)values(1000481,姜北,5);inert nto Studn(Sn, Sna, Sse, Se,Dno) value(10019,孙中孝,M,18,1); nert into Student(no, Sne,Ssex, Sage, Dno) valu(100042,杨光,M,1,11);nsertntoStunt(Sno, Sname, Ss, Sage, Do) vals(10048,张永强,M,16,11);inser into Sde(Sno, Sae, x, S

10、ae, Dno)values(1000619,陈博,M,,11);sertto Stude(Sno, ame,Ssex, Sag, no) value(100705,汤文盼,M,1,);inert int tudent(So, nae, Sse,Sage,Dn)vlues(1000,苏海恩,M,17,1);运营成果为:3. 分别采用 UI界面和 SQL 语言为 niriy 的 Course表输入下列数据输入SQL语言代码为:*课程信息表 Coure (no, Cne,Cpno, Ccredit)*crete tabl oure(Cnoumber(10) primy key ,namvarcha

11、r2 (50),Cpno uer(1) ,Ceditnumber(10),foregn ey(C) rfereces Cors(no);iset ito Course(Cno, Cname, Ccredit) ues(2,高等数学,8);isrintoCoue(Co,name, Credt)values(6,语言程序设计,4);insr in Corse(Co, Came, Ccreit) values(7,大学物理,8);inser intoour(Cno, Cname, Ccredit) values(,大学化学,3);insert into Course(Cno, Cname, Ccei

12、t) values(10,软件工程,2);insert nto Crse(Cno, Cname,Ccredt) vaues(1,美国简史,2);inert ino Curse(Cno, Cname, Credit) vals(3,中国通史,6);inser intooure(Co, Cnam,Ccredi)vlues(14,大学语文,3);nset int oe(n, Cnae, pn,crdit) valu(,数据构造,6,);sert itCrse(no, Cnam, Cpno, crdit) vale(4,操作系统,5,4);inertinto Cse(no,nm,Cpno, Ccrdit)valus(1,数据库原理,5,4);

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 活动策划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号