标签:test1 null char course 2021 student sid 最新版 山东大学
山东大学数据库实验1(2021年最新版)
creat table test1_student
( sid char(12) not null,
name varchar(10) not null,
sex char(2),
age int,
birthday date,
dname varchar(30),
class varchar(10) )
create table test1_course
( cid char(6) not null,
name varchar(40) not null,
fcid char(6),
credit numeric(4,1))
create table test1_student_course
( sid char(20) not null,
cid char(6) not null,
score numeric(5,1),
tid char(6),
sctime date )
insert into test1_student values(‘200800020101’,’王欣’,’女’,19,date’1994-02-02’,’计算机学院’,’2010’);
insert into test1_student values(‘200800020102’,’李华’,’女’,20,date’1995-03-03’,’软件学院’,’2009’);
insert into test1_course values(300001,'数据结构',null,2);
insert into test1_course values(300002,'数据库',300001,2.5);
Insert into test1_student_course values(200800020101,300001,91.5,100101);
Insert into test1_student_course values(200800020101,300002,92.6,100102);
create table a as
select distinct sid
from test1_student_course;
create table b as
Select distinct sid
from test1_student
minus
select sid
from a;
create view test2_01 as
select test1_student.sid,name
from test1_student cross join b
where (test1_student.sid = b.sid);
create view test2_01 as
select test1_student.sid,name
from test1_student CROSS JOIN b
where (test1_student.sid = b.sid);
标签:test1,null,char,course,2021,student,sid,最新版,山东大学 来源: https://blog.csdn.net/weixin_47373497/article/details/116503667
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。