解决方案 »
- 帮帮忙我是菜鸟。-关于列。。。
- MSG命令究竟怎么用啊。在WIN7系统里面没有信使服务啊
- SQL Server 2008 安装后,没有Client的数据库管理工具?
- 关键字查询问题 大家帮忙想想办法
- 我的时间是varchar,格式是2013-09,我想进行比较,该怎么比较?
- 求在sql中的建表问题
- sql 中代替 in(...) 的写法.....................等....
- 这是sqlserver2005自动安装之命令行的问题,恳请大家支招
- 安装错误
- SQL中的char型,Char(2),如何使去出来的数前面自动补"0"?
- 如何让所有SQLServer用户只读访问某数据库?
- sql 查询问题
( a int,
b int,
c int,
d int,
e int
);create table B
(
b int,
c int,
d int
);
CREATE TRIGGER TRI_A ON A
AFTER INSERT
AS BEGIN declare @a int,@b int ,@c int ,@d int ,@e int
select @a=a ,@b=b,@c=c ,@d=d,@e=e from inserted i
if @a <>'' --invalid check ,u would write yours business function to replace it
begin
insert into B(b,c,d) select @b,@c,@d
delete a
from A as a,inserted i
where a.a=i.a and a.b=i.b
end else begin rollback
endEND