在oracle中,insert语句的使用:
1、insert into 表1(列名1,列名2,……) values(值1,值2,……)
2、insert into 表1(列名1,列名2,……)
select 列名1,列名2,…… from 表2
3、insert all --无条件添加
into 表1 values(列名1,列名2,……)
into 表2 values(列名1,列名2,……)
select 列名1,列名2,…… from 表3
4、insert all --如果条件满足,则添加
when 条件1 then into 表1 values(列名1,列名2,……)
when 条件2 then into 表1 values(列名1,列名2,……)
select 列名1,列名2,…… from 表3
5、insert first --对于第一个满足的条件,则添加
when 条件1 then into 表1 values(列名1,列名2,……)
when 条件2 then into 表1 values(列名1,列名2,……)
select 列名1,列名2,…… from 表3
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/653220/viewspace-1982111/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/653220/viewspace-1982111/