mwbr.net
当前位置:首页 >> insErt into B(A, B, C) sElECt D,E,F From B in '... >>

insErt into B(A, B, C) sElECt D,E,F From B in '...

??

这种insert的标准语法是 insert into tablename (c) select a+b from tablename2 where 条件

insert into 表R (A,B) select 默认值,D from 表T

INSERT INTO 表1(d,e,f) SELECT a,b,c FROM 表2

1、你没有commit,只要你换了一个窗口去查询,根本看不到变化。 2、commit之后你执行SELECT * FROM A,看库表里的数据不就验证了么

SELECT 2INSERT INTO dbo.user_button ( USER_ID,...fromuser a,user_button bwherea.user_id = b....'c:\mssql7backup\MyNwind_1.dat' --- 开始备份...

--先在A中添加两个字段 alter table A add d varchar2(100); alter table A add e varchar2(100); insert into A (a,b,c,d,e) select a,b,c,d,e from B; commit;

insert into 表1(a,b)select c,CASE WHEN e is null then d-f else d end from 表2

你用的是select *,它查询出来的字段有几个?它应该和insert into table1的a,b,c要对应才行,你可以用select field1,field2,field3 from table2更安全些

一、INSERT INTO (SELECT FROM)语句(可连表、可加限制条件where子句) 语句形式为:INSERT INTO table2(a,b,d) (SELECT a,b,d FROM table1) 二、如下代码: INSERT INTO T_COMMISSION (TYPE_NUM,PRODUCT_NUM,FAST_COMMISSION,CREATE_DATE,EMPLOYE...

网站首页 | 网站地图
All rights reserved Powered by www.mwbr.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com