黄松平.txt

来自「关于oracle和sql的书籍和ppt教程,非常好,本人珍藏品」· 文本 代码 · 共 19 行

TXT
19
字号
create table hsp_student (sno int,sname varchar2(10),sex char(2),age int,cno int,score float);

create table hsp_course(cno int, cname varchar2(20),xuefen int);

alter table hsp_student add constraint hsp_pri_sno primary key(sno);

alter table hsp_course add constraint hspcourse_pri_cno primary key(cno);

alter table hsp_student add constraint hsps_for_cno foreign key(cno) references hsp_course (cno);

alter table hsp_student add constraint sex_name_check check(sex in ('男','女') and age between 18 and 60);

alter table hsp_course modify ( cname not null,xuefen not null);

update hsp_student set score=score+10 where score<60;

select sno,sname,score from hsp_student where score<60;

                                   

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?