DBA > Job Interview Questions > Microsoft SQL Server FAQs

What does this return on SQL Server 2005? sele

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

What does this return on SQL Server 2005?
select NEWSEQUENTIALID()

Answer: This returns an error.

Explanation: This returns an error. The NEWSEQUENTIALID() function can only be used in a default constraint on a table, not in a query. When used there it returns a new GUID that is greater in value than any previously generated GUIDs.

(Continued on next question...)

Other Job Interview Questions