mysql可以使用if语句啊
比如:
if (条件) thenelse
*** 作
end if
CREATETRIGGER
a1_a
ON
[dbo].[a1]
FOR
INSERT
AS
insert
into
b.dbo.b1(g,h,j)
select
c
as
g,d
as
h,e
as
j
from
inserted
在A数据库A1表,加上面的触发器(只限于同一台服务器不通数据库数据转存),如果要在不同的服务器上,就先在A所在服务器上加链接服务器,触发器修改为:
CREATE
TRIGGER
a1_a
ON
[dbo].[a1]
FOR
INSERT
AS
insert
into
[server
name].b.dbo.b1(g,h,j)
select
c
as
g,d
as
h,e
as
j
from
inserted
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)