prompt 0. init env
set pagesize 99; set linesize 160;
prompt 0.1 demo for delete statement
–delete from tableName where condition
–delete from emp where ename in(‘TANG’,’HAIBO’)or ename is null;
prompt prepare to delete data;
selecte * from emp where empno>2000 and empno<3000; delete from emp where empno>2000 and empno <3000;
prompt 1.demo for insert statement
–insert into tablename[(fieldlist)] values(valuelist);
insert into emp values (2001,'T','teacher',null,'01-9月-96',800,100,null);
insert into emp (empno,enme,job , mgr, hiredate,sal,comm,deptno) value(2002,'t' ,null,null ,null ,900,600 ,null);
inset into emp(ename,empno) value ('TESTER',2004);
drop table emphighsal as select *from emp where 1=0;
insert into emphighsal select * from emp where sal>2500;
prompt 2.demo for update statement
update emp set sal =sal+100 where empno=2001; update emp set sal =sal+1000,comm=(sal+1000)*0.1 where empno=2003;
写完保存,最后加句 commit;
本站由以下主机服务商提供服务支持:
0条评论