# 处理数据
## insert
--1.向表中插入所有列(所有不需要写列名)
insert into emp values (1, ‘tom_111‘, ‘clerk‘, 7839, sysdate, 8500, 10000, 10);
--2.向表中插入部分列
insert into emp(empno, ename, sal, comm, deptno) values (2, ‘tom_222‘, 8502, null, 10);
--5.sql插入语句的地址符 & 取地址符后面相当于一个变量
insert into emp(empno, ename, sal, comm, deptno) values (&empno, &ename, 8502, null, 10);
--6.取地址符,可以在任何sql语言中使用,在select语言中也可以使用地址符
select * from emp where sal > &sal;
--7.批量插入数据
create table emp10 as select * from emp where 1-2; insert into emp10 select * from emp where deptno = 20;
Orcale查看表
select * from tab;
## update
update emp10 set sal = 1800 where ename = ‘SMITH‘;
## delete
delete from emp10 where empno = 20;
## delete 和 turncate 区别
1.delete