Home > Database > Mysql Tutorial > mssql 两种数据插入方式

mssql 两种数据插入方式

WBOY
Release: 2016-06-07 17:58:26
Original
1290 people have browsed it

下面那种不太常见的插入方法。

--常用的方式
代码如下:
insert into jobs(job_desc,min_lvl,max_lvl) values('SQL语句插入数据A',45,54)
insert into jobs(job_desc,min_lvl,max_lvl) values('SQL语句插入数据B',45,54)
insert into jobs(job_desc,min_lvl,max_lvl) values('SQL语句插入数据C',45,54)

--比较简单的方式
代码如下:
insert into jobs(job_desc,min_lvl,max_lvl)
select 'SQL语句插入数据A',45,54
union all select 'SQL语句插入数据B',45,54
union all select 'SQL语句插入数据C',45,54
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template