Bee Eee Blog

Archive for October 29th, 2008

MS SQL tricks for uniqueidentifers or Guid and date time.

by brian on Oct.29, 2008, under mmsql

In MS SQL Server 2005 the following code is how to get a new uniqueidentifier, and the current date and time.

SELECT newid(),getdate()

Produces these results.

------------------------------------ -----------------------
125700F3-8FB8-496F-8EA4-35D9CB9E8415 2008-10-29 13:09:54.557
(1 row(s) affected)
318 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...