Browse by Tags

SQL Server TSQL to find complete CONSTRAINT information on a table catalog?
09 January 08 06:26 AM | SQL Master | 2 Comments   
I have had a requirement to see a detailed information about a constraint on a table that includes table fields, type, rules, referenced table and fields for FOREIGN KEYs, etc. Found this useful TSQL to get such information: SELECT k.table_name, k.column_name Read More...
How do I find the parameters for a specified stored procedure or function?
10 December 07 04:21 PM | SQL Master | 2 Comments   
USE < database_name >; GO SELECT SCHEMA_NAME ( schema_id ) AS schema_name , o . name AS object_name , o . type_desc , p . parameter_id , p . name AS parameter_name , TYPE_NAME ( p . user_type_id ) AS parameter_type , p . max_length , p . precision Read More...
Ways to make best use of INFORMATION_SCHEMA Views - Stored procedures & Functions?
15 October 07 05:59 AM | SQL Master | 2 Comments   
How many of you took help from using INFORMATION_SCHEMA views in SQL Server? Have you ever wondered in returning the informaiton of a Stored procedure or function, you may be thinking using SP_HELPTEXT would get you. Parts of the solution is yes with Read More...
Handle ISDATE() with care
24 September 07 07:09 AM | Madhivanan | 2 Comments   
Now-a-days it became common practice for newbies to varchar datatype to store dates. My first advise is to use proper DATETIME datatype. Sometimes it is preferred to use varchar when importing dates from other systems(to avoid any errors if the source Read More...
Enhanced ISNUMERIC() Function
15 July 07 02:14 AM | Madhivanan | 0 Comments   
It seems often users want to check whether the data has only numbers in a varchar type column. The commonly suggested one is to make use of SQL Server's ISNUMERIC() function. But the problem in using that function is that it will treat some alphabets, Read More...