Microsoft
Software
Hardware
Network
Question : how so I get the uniqueidentifier after insert in SQLEXPRESS?
I need to create a batch number for entering a set of records. I have a batch table that stores the unique batch number and other information about the batch. When the user clicks "New" to create a new batch, I use the Insert command to add the record. But then I need the uniqueidentifier that was created for the batch number. What is the SQL syntax for this?
Thanks in advance!
Answer : how so I get the uniqueidentifier after insert in SQLEXPRESS?
DECLARE @GUID uniqueidentifier
SET @GUID = NEWID()
INSERT Item VALUES (@GUID,'Yak Hoof')
and return the value of @GUID as output parameter
Random Solutions
how to exclude one of the table during imp/exp?
I have this function, but unable to put results on the form
DDE from MSAccess to MSExcel
How to set focus to a textbox in WPF
Union Select Problem
Modifying default office templates through Group Policy
Operation terminated with error -1808 (JET_errDiskFull, No space left on disk) after 8846.125 seconds.
SQL Query: How do I get the date/time value just before the MAX record?
Set crystal report discrete value
Excel cell show one formula and calculate using another hidden one