一条sql语句插入多条记录

mysql:

INSERT DELAYED INTO `newsort` (`sort_id`, `sort_name`, `sort_bz`) VALUES  
(1, 'aas', 'sdsdfsdfsf'),  
(2, 'ffff', 'gggg'),  
(4, '生活类', '要懂得生活才好!'),  
(5, '股票行情', ''),  
(6, '政治类新闻', ''),  
(7, 'IT行业新闻', ''),  
(8, '宗教类新闻', '');  

 

oracle:

insert  into codename (cn_id,cn_code,cn_name,cn_type)     
select 8032,21,'内训',76 FROM DUAL   
union   
select 8033,22,'外派',76 FROM DUAL   
union   
select 8034,23,'境外',76 FROM DUAL 

 

sqlserver:

INSERT 	INTO Student ( SNO, SNAME, SEX, DEPTNO, SAGE)
	Select 1001, '张天', '男', 10, 20    Union   all  
	Select 1002, '李兰', '女', 10, 21    Union   all  
	Select 1003, '陈铭', '男', 10, 21    Union   all 
	Select 1004, '刘茜', '女', 20, 21   Union   all 
	Select 1005, '马朝阳', '男', 20, 22;

 

© 2015 - 2016, 新之助meow. 原创文章转载请注明: 转载自http://www.xinmeow.com

0.00 avg. rating (0% score) - 0 votes
点赞