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 import contact list from outlook expres into Outlook 2003
override standard SQLEXEC function vfp
Why is the system popping up after reboot with .NET Framework 2.0 required after Vista SP 64 to Win 7 64 upgrade?
Scroll on touchpad gone after Windows 7 installation
Handle to the Listview in Open/Save Dialog
The most effective way to communicate on the web in real time.
Excel VLookup based on Duplicate values
Convert Windows 2003 TS licenses to Windows 2008 TS CAL's
what is the outlook history file called
ADOX Add Column Multi-Step OLE DB errors