--pm_stu 插入数据
insert into pm_stu values('1','张三');
insert into pm_stu values('2','李四');
insert into pm_stu values('3','王五');
insert into pm_stu values('4','赵六');
--pm_ci 插入数据
insert into pm_ci values('1','1,2,3,4');
insert into pm_ci values('2','1,4');
insert into pm_stu values('1','张三');
insert into pm_stu values('2','李四');
insert into pm_stu values('3','王五');
insert into pm_stu values('4','赵六');
--pm_ci 插入数据
insert into pm_ci values('1','1,2,3,4');
insert into pm_ci values('2','1,4');
--创建pm_stu
create table pm_stu
( stu_id varchar2(20) primary key,
stu_name varchar2(20)
);
--创建pm_ci
create table pm_ci
( ci_id varchar2(20) primary key,
stu_ids varchar2(100)
);
create table pm_stu
( stu_id varchar2(20) primary key,
stu_name varchar2(20)
);
--创建pm_ci
create table pm_ci
( ci_id varchar2(20) primary key,
stu_ids varchar2(100)
);
已采纳回答 / 慕仰0354868
自然连接是在广义笛卡尔积R×S中选出同名属性上符合相等条件元组,再进行投影,去掉重复的同名属性,组成新的关系。即自然连接是在两张表中寻找那些数据类型和列名都相同的字段,然后自动地将他们连接起来,并返回所有符合条件按的结果。通过别名,将同一张表视为多张表
2017-02-14