2024年3月21日发(作者:)

oracle的insert into用法

oracle的insert into用法:

1、单表插入:

insert into 表名(字段列表) values(值列表);。

例如:

insert into student(id,name,sex,age)

values(1,'kate','man',18);。

2、多表插入:

insert into 表名(字段列表) select 子查询构成的值列表 from 其

他表;。

例如:

insert into student(id,name,sex,age) select

,,, from student as s,teacher as t where

=;。

3、全表插入:

insert into 表名 select * from 其他表;。

例如:

insert into student select * from teacher;。

4、自动增加序列号:

insert into 表名(字段列表) values(序列.nextval,值列表);。

例如:

insert into student(id,name,sex,age)

values(student_l,'kate','man',18);。