首页 > 数据库 > 文库 > 正文

一条DELETE语句

2020-10-29 21:54:51
字体:
来源:转载
供稿:网友
WITH w AS(
SELECT Id,ROW_NUMBER() OVER(ORDER BY Id DESC) AS [Row]
FROM [t1]
WHERE Code=@Code
)
DELETE FROM t1 FROM t1 s INNER JOIN w ON s.Id=w.Id
WHERE w.Row>100;
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表