如题
解决方案 »
- 修改数据结构如何保留原有数据?
- 事务设置有:全部回滚和只回滚错误语句,如何查看当前是何种设置呢?
- 简单的insert语句,请高手指点一下,谢谢!
- 求一SQL语句
- 求一存贮过程,输入身份证返回客户的记录与姓名
- SQL SERVER 7 数据库恢复问题!!!
- 紧急求救:sqlserver如何在enterprise manager的sql server group下面建立两个连接
- 请教一个“学生管理系统C++版”(毕业设计)
- 谁会这样的约束,目的是消除重复值,也许很简单
- 求助 插入一张表数据中有需要从别的列截取 也有自己赋值的
- 【急】2000和xp下访问sql server数据库的问题。
- 求一个关于分隔符的SQL
insert into table1(字段列表) select 字段列表 from table2,table3 where 关联条件 and/or 其它条件
insert into ...select... where
还有一个 insert into exec 存储过程 你也加不上where吧
(
id
)
SELECT
7WHERE 1=1可以的
declare @b table(Employee_sn int,CreateDate datetime)
insert into @b
select 1,'2007-01-02'
union all select 1,'2007-01-05'
union all select 1,'2007-01-03'
union all select 3,'2007-01-02'
union all select 1,'2007-01-04'
union all select 1,'2007-01-02'
union all select 2,'2007-01-02'
select * from @b;
insert into @a select * from @b where employee_sn=1;
select * from @a;
比如 insert tablename where condition这是肯定不行的