[Oracle]sql中insert into select,select into,update select语句
[Oracle]sql中insert into select,select into,update select语句Sql代码--需要table1存在--where后面可以写关联子查询条件,也可以不写insert into table1 t1(id, name)select id,name from table2 t2where t2.字段=t1.某字段;Sql代码--select * into table2 from table1--需要tmp_table不存在,新建,PL/SQL需要如下写法create table tmp_table asselect id from tbl_projectSql代码--update selectupdate table1 t1 set t1.name =(select name from table2 t2 wehre t2.id=t1.id)