码迷,mamicode.com
首页 > 数据库 > 详细

常用SQL语法

时间:2014-11-07 12:38:38      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:style   color   sp   strong   数据   div   on   bs   sql   

SQL 大全

 
 
将一张表的数据插入到另一张表
 
1.如果列名相同
     insert into tab_user2 select * from tab_user where site=17;
 
2.指定列名插入
     insert into tab_user2(id,account) select id,account from tab_user where site=3;

常用SQL语法

标签:style   color   sp   strong   数据   div   on   bs   sql   

原文地址:http://www.cnblogs.com/svennee/p/4080890.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!