Java 开发中之四:SQL中语句分类
select * from emp where sal> any (select sal from emp where emp.deptno=10) any:后面可以跟单列集合,说明任何一个
all: 后面可以跟单列集合,说明所有都满足
DDL:(没有事务)
create ,drop, alter
truncate table:裁断表
DML:CRUD 配合事务(除了读以外)
TCL:
commit,rollback,savepoint oracle中默认的事物是隐性的 如打开,set autocommit on/off
DCL:
grant revoke
备份表结构:create table emp1 as select * from emp where 1=0; insert into emp1 select * from emp;
集合运算符
A(1,2,3,4,5,6) B(4,5,6)
交集:intersect(4,5,6)
并集:union all(1,2,3,4,5,6,4,5,6)
差集:minus
posted on 2012-12-08 13:14 peter.peng 阅读(203) 评论(0) 编辑 收藏 举报