--在插入之前
if select count(*) from table where user = 插入的指定值
begin
delete from table where table.时间列 = (select min(table.时间列) from table)
--插入记录
--insert into ...
end
else
insert into...
--这个东西写在触发器里面挺好的
if select count(*) from table where user = 插入的指定值
begin
delete from table where table.时间列 = (select min(table.时间列) from table)
--插入记录
--insert into ...
end
else
insert into...
--这个东西写在触发器里面挺好的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货