Browse by Tags

How to drop all tables, all views, and all stored procedures from a SQL Server 2005 Database?
20 May 08 01:12 AM | SQL Master | 2 Comments   
It may not be a hardcore requirement on day-to-day basis to drop all tables, views and stored procedures from a SQL Server database within your environment, but it will be handy to have such a code at your end when such task is required. There are 2 ways Read More...
TSQL to get SQL Server properties - How do I know which version of SQL Server I'm running?
21 December 07 02:34 AM | SQL Master | 2 Comments   
Use the following TSQL SELECT SERVERPROPERTY('Collation') Collation, SERVERPROPERTY('Edition') Edition, SERVERPROPERTY('Engine Edition') EngineEdition, SERVERPROPERTY('InstanceName') InstanceName, SERVERPROPERTY('IsClustered') IsClustered, SERVERPROPERTY('IsFullTextInstalled') Read More...
TSQL Event Handling with TRY and CATCH in SQL Server 2005 - simple method
10 December 07 03:18 AM | SQL Master | 2 Comments   
Event Handling is a major part in any application development that includes the error-handling code that is producing errors. Until previous versions of SQL Server capturing error-handling code is bit hard to implement, as you may be aware within SQL 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...
Getting table name from column name
15 September 07 05:23 AM | SQL Master | 2 Comments   
If you know the name of one column you want to find from which table that is originated, to retrieve the table name you can use following TSQL: SELECT CASE (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS AS c2 WHERE c2.TABLE_NAME = c1.TABLE_NAME AND Read More...