在sql中如何一次插入多条数据?

 

查书看到的两种方法:

写法1:insert into tableName (列名1,列名2,列名3,列名4) values (值1,值2, 值3, 值4),(值1,值2, 值3, 值4)......

写法2:insert into tableName (列名1,列名2,列名3,列名4)   select 值1,值2,值3,值4,

       union all select 值1,值2,值3,值4

       union all select 值1,值2,值3,值4......

猜你喜欢

转载自blog.csdn.net/SQLplus111/article/details/83149860