--创建表 create table emp3 as select employee_id,last_name,hire_date,salary from employees --查询表 select * from emp3 --插入表 insert into emp3 values(1001,'AA',sysdate,10000)
运行结果
--空值用null代替 --复制表 insert into emp3(last_name,employee_id,hire_date) select last_name,employee_id,hire_date from employees where department_id=80
--创建脚本 insert into emp3(last_name,employee_id,hire_date) values('&name',&id,'&hire_date')
--更新114he1205工资一样 update employees set job_id=( select job_id from employees where employee_id=205 ),salary=( select salary from employees where employee_id=205) where employee_id=114