Identity

/* Getting the current value of identity column of a table. */SELECTIDENT_CURRENT(‘Invoice’) /* OR */ DBCC CHECKIDENT (invoice,NORESEED) /* Getting the incremental values of identity column of all tables from one database. */ USE training2005SELECT TABLE_NAME,IDENT_INCR(TABLE_NAME)AS IDENT_INCR FROM INFORMATION_SCHEMA.TABLESWHERE IDENT_INCR(TABLE_NAME)IS…

SQL 2k Tips : UPDATETEXT

I have received the email from Grace on Tuesday, February 01, 2005 4:07 PM. Wow! She was sharing some interesting things related to SQL. Thank you so much, Grace! Hi Micheal, Do you know that ntext data type can’t do…

EXEC & EXEC sp_executesql

EXEC and EXEC sp_executesql for Searching.. Cool.. isn’t it? But there are one limitation of using sql_executesql. As this statement accept the NVARCHAR which has only 4000 words capacity, the SQL string muct be less than 4000 words. :( But…