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
One question about Log4Net & Common.Logging
Running SQL server DTS with condition check
Microsoft .NET Framework v1.0.3705 Update preventing entering standby...
Populating SharePoint Contact List from Active Directory
Printing question
Upgrade to Vista, video card not detected
SQL - display the top and bottom date in one result set
Access ADP Error Msg: "Cannot Find Column"
vpshellres.dll could not be found
How to shrink Wss_Content_log.ldf file in wss 3.0??