不懂
:new.w_id:=ll_no;
这句是什么意思?
:new.w_id:=ll_no;
这句是什么意思?
解决方案 »
- 举例说明SQL语言是完备的关系数据语言.
- 关于SQl中碰到的一个难点 高手进
- 如何取得第N个记录的数据?谢谢
- 再请教你一个问题
- [求助]表名,列名都为参数,执行出错!
- 安装的时候都成功了只有Reporting Services安装失败,请问怎么样在我这个实列从装Reporting Services?
- 想请教一下怎么样更容易理解表之间的关系
- 表中关键字的问题,请大虾多多指点?
- 请教ORACLE和SQL SERVER各有什么日志,存在哪里,格式如何,如何读取?热盼高手解答,本人要写有关日志的论文,急用!会给高分的
- 如何用ADO 对SQL SERVER的二进制大对象进行操作 急急急 !!
- 用触发器更新和删除数据的问题
- 由于小弟初当斑竹.可能不小心删了nononono和另一个兄弟的回复.
创建序列并与表联系的方式不同。此外,sql中没有行级触发器的
概念,您的意思是基于自增序列创建另一个工作序列,在sql中可以
用instead of insert触发器完成:
create trigger trg_xwxx on whir_xwxx
instead of insert
as
begin
insert into whir_xwxx
select id,cast(convert(char(6),getdate(),112) as int)*10000+id as w_id,... from inserted
end
go
create trigger trg_xwxx on whir_xwxx
instead of insert
as
begin
declare @i int
set @i=1
insert into whir_xwxx
select id,cast(convert(char(6),getdate(),112) as int)*10000+@i as w_id,@i=(case @i+1 when @i>9999 then 1 else @i+1 end),... from inserted
end
go