August 2, 2006

Determine Whether a Table Has an Identity Column

This code is for MSSQL Server, but applicable for MS SSQL Server 7 or above. Check in T-SQL: SELECT OBJECTPROPERTY(object_id(‘TableToBeChecked’), ‘TableHasIdentity’) SQL Server returns 1 if the table has an

Platform-independent New Line Characters

Because you need to use the new line character in most outputs?and because the line-terminating characters differ on different systems?you need to be able to identify what kind of system