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
DFS not replicating certain files
Overlap CTreeCtrl and multiline CEdit in dialog
SQL Server problem with date format
How to revert back the saved file in MS word?
How to make an automated roster using excel
Set Font For Workbook or Worksheet Through VBA
IE8 home page is being forced to google.co.uk
Server 2003 RDP connection fails.
Call NetMessageBufferSend function from vb.net
String or binary data would be truncated.