摘要:
/*create table Z_COURSE ( id NUMBER not null, cour_code VARCHAR2(20), cour_name VARCHAR2(20), p_cour_code VARCHAR2(20) ); comment on column Z_COURSE.c
阅读全文
posted @ 2017-06-25 20:09
汐风雪夜
阅读(1071)
推荐(0)
编辑
摘要:
/*CREATE TABLE STUDENT (SNO VARCHAR(3) NOT NULL, SNAME VARCHAR(4) NOT NULL, SSEX VARCHAR(2) NOT NULL, SBIRTHDAY DATE, CLASS NUMBER NOT NULL); CREATE T
阅读全文
posted @ 2017-06-25 20:08
汐风雪夜
阅读(9569)
推荐(0)
编辑
摘要:
drop table PRODUCT cascade constraints; create table PRODUCT ( id NUMBER not null, --主键 pcode VARCHAR2(20) not null, --商品编号 pname VARCHAR2(20), --商品名称
阅读全文
posted @ 2017-06-25 20:07
汐风雪夜
阅读(1800)
推荐(1)
编辑
摘要:
高级查询(多表连接查询): 等值连接 select s.sname,e.cno,e.degree from student s,score e where s.sno=e.sno; 左外连接 left join ...on 左外连接on后面的等值连接表,左边的表全显示,右边的如果没记录用空补全 se
阅读全文
posted @ 2017-06-25 20:06
汐风雪夜
阅读(1221)
推荐(0)
编辑
摘要:
group by 按照某几列分组 having 分组之后的过滤 like(%, _) 模糊查询, %表示 select * from emp e where e.empname like '%ccc%' distinct 去除重复 select distinct e.empname from emp
阅读全文
posted @ 2017-06-25 20:05
汐风雪夜
阅读(3539)
推荐(0)
编辑