在库存过程中获取当前“插入" ID.指示 [英] get in stocked procedure the id of the current "insert" insctruction

查看:80
本文介绍了在库存过程中获取当前“插入" ID.指示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在存储过程中获取当前执行的插入"指令的ID(即身份),该ID将在第二条插入"指令中使用

how to get, in a stocked procedure, the id( which is an identity) of "insert" instruction currently executed which will be used in the second "insert" instruction

推荐答案

请通过以下链接

ident当前 [
please go through the following link

ident current[^]

SELECT IDENT_CURRENT(‘tablename’)



问候
塞巴斯蒂安(Sebastian)



Regards
Sebastian


在这里你走了

在SQL Server中获取最后插入的身份 [
Here you go

Obtaining the Last Inserted Identity in SQL Server[^]


这篇关于在库存过程中获取当前“插入" ID.指示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆