📄 613.txt
字号:
/*
create table xuesheng(id int , name varchar2(10),age int);
create table course(id int , name varchar2(20),xuefen int)
alter table xuesheng
add sex char(10);
alter table xuesheng
modify (sex char(2));
select age as nianling from students ;
rename xuesheng to students;
alter table students
add constraint pk_xuesheng_id primary key(id);
drop table xueshengchengji;
create table xueshengchengji(sid int ,cid int ,chengji int);
alter table course
add constraint pk_course_id primary key(id);
alter table xueshengchengji
add constraint pk_xuesheng_sid_cid primary key(sid,cid);
alter table xueshengchengji
add constraint fk_xue_sid foreign key(sid) references students(id);
alter table xueshengchengji
add constraint fk_xue_cid foreign key(cid) references course(id);
alter table students
add constraint stu_uni_name unique(name);
alter table students
add constraint check_stu_age check((age > 0) and (age < 100));
alter table students
modify(name not null);
约束
not null
check
unique
primary key
foreign key
*/
--create table course(id int , name varchar2(20),xuefen int);
--create table temptt(id int primary key,name varchar2(10) primary key);
/*create view stu_tea_view
as
select t.id tid,t.name tname,s.id sid,s.name sname
from teacher t, student s
where t.id = s.tid */
-- Create sequence
create sequence SEQ
minvalue 1
maxvalue 999999999999999999999999999
start with 13
increment by 1
cache 20;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -