我是菜鸟,请指教,急!急! 写错了,每一个记录的值为100 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CREATE TRIGGER Tr_insert ON [dbo].[aa] FOR INSERTAS declare @code bigint declare @id int set @id=(select id from inserted) if @id=1 begin update aa set code=100 end else begin update aa set code=100+@id-1 where id in( select id from inserted ) end 送分问题,sqlserver2000 使用中文列名对性能有没有影响? N行转多列 高分相求 已经学习过现有的行转列问题了 我在数据库中执行了update语句 能撤销么? 百分求分类汇总的问题 SQL2000数据表中Text字段转到Oracle数据表问题 这样的联接该如何实现? 求解数据库查询问题。 关于使用WEB助手向导生成html页面的问题? 问题还是没有得到解决,请csdn高手进来看看.(在线等!) 如何在Delphi中,捕获一个由存储过程触发的自定义的Message T-SQL/.Net/C#/VB/Java 实现: 将天文数字转换成中文大写 无符号短整型是什么?怎么写?
FOR INSERT
AS
declare @code bigint declare @id int
set @id=(select id from inserted)
if @id=1
begin
update aa
set code=100
end
else
begin
update aa
set code=100+@id-1
where id in( select id from inserted )
end