Thursday, November 01, 2007 - Posts

TSQL to return internal table columns and column data types?
01 November 07 07:26 AM | SQL Master | 2 Comments   
SELECT SCHEMA_NAME(itab.schema_id) AS schema_name ,itab.name AS internal_table_name ,typ.name AS column_data_type ,col.* FROM sys.internal_tables AS itab JOIN sys.columns AS col ON itab.object_id = col.object_id JOIN sys.types AS typ ON typ.user_type_id Read More...
Undocumented DATE and TIME related functions
01 November 07 08:36 AM | Madhivanan | 0 Comments   
It is quite surprising to know the undocumented date and time related functions that work in both sql server 2000 and 2005 Run these and see(I think they are self-explanatory ) select {fn current_date()} select {fn current_time()} select {fn now()} select Read More...