MSSQLserver 操作返回ID方法

it2022-05-09  31

1.添加语句 insert into 时:

在语句最后加上;select @@IDENTITY; 可返回当前添加记录的ID

2.做修改语update时:

在语句后面 where前加上output inserted.ID 可返回当前修改的记录ID

转载于:https://www.cnblogs.com/zhaoqiangxiaoxiao/p/3518598.html

相关资源:DirectX修复工具V4.0增强版

最新回复(0)