insert into 的另一种添加插入新行方式

Posted wangyonglai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了insert into 的另一种添加插入新行方式相关的知识,希望对你有一定的参考价值。

语法

1 插入一行

insert into table (field1,field2.....) select value1,value2........;

  

2 插入多行

insert into table (field1,field2.....)
select value1,value2........ union
select value1,value2........

  

 

实例

create table bank
(
    customerName char(10),    --顾客姓名
    currentMoney money        --当前余额
)
go

insert into bank(customerName,currentMoney)
select 张三,1000 union
select 李四,1

 

以上是关于insert into 的另一种添加插入新行方式的主要内容,如果未能解决你的问题,请参考以下文章