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
Dlookup to prevent duplicate entries
server 2003 activation
Passing parameter by open args
Exchange 2003 to 2007 mailbox move problem
Perl SQL Server error - SQL-01004
Multiple Combo Box Selection in Microsoft Access
Adding value to list box
Windows 2003 Server - IIS 6 connection to shared server - Logon/Logoff errors Event 529 & 680
Run Queries Based on Form Values
How do I install aTube Catcher 1.0 rc2 setup.231 program?