问题描述
我在表格中有一个guid列,基于我想要检索最后插入行的guid。并在页面加载时存储该信息...我的意思是在用户登录后,他能够看到他所有最后插入的值...
问候
sreekanth
Hi,
I have a guid column in table based on that guid i wants to retrieve last inserted row. and store that information at the time of page load...i mean after login by user he can able to see all the last inserted values by him..
Regards
sreekanth
推荐答案
CREATE PROCEDURE GetGUIDByUser
@userid INT
AS
BEGIN
SELECT GuidKey
FROM TableName
WHERE userid = @userid
END
要获取最后插入的值,请参阅: []并在SP中使用它来插入数据。
看看这里:
[]
[]
[]
To get last inserted value, see: @@IDENTITY[^] and use it in SP in which data are inserted.
Have a look here:
Walkthrough: Displaying Data Using a Stored Procedure in the GridView Web Server Control[^]
Modifying Data with Stored Procedures[^]
How to: Execute a Stored Procedure that Returns Rows[^]
这篇关于最后插入guid并在页面加载时将guid存储在文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!