Top five T-SQL stored procedures

T-SQL guru and senior database architect Brian Walker was generous enough to share his favorite and most useful SQL Server stored procedures over the past few months. His series has come to a conclusion, but we've got his "top five" according to your visits. We're sure these routines will help ease some of your workload. You can also view our

    Requires Free Membership to View

complete stored procedure collection.

#1 - Find columns and tables
This simple routine is handy for finding columns by name and listing the table(s) in which they exist..

#2 - List database objects by selected type(s)
This stored procedure returns a list of all the objects of selected types in the current database.

#3 - A simple way to perform crosstab operations
SQL Server crosstab operations usually involve complicated T-SQL coding. Simplify the process with this routine.

#4 - Search character columns for a given string
This routine allows you to search for occurrences of a string in the character columns (char, nchar, varchar, nvarchar) of a table set.

#5 - Execute T-SQL code from a file
Existing routines to execute T-SQL code from a file without using osql and xp_cmdshell have many limitations. This routine addresses the shortcomings

More information from SearchSQLServer.com

  • RSS: Sign up for our SQL Server DBA or developer feeds to get new expert technical advice every week day
  • Glossary: SQL Server slang stumping you? Look it up in our glossary
  • Topics: Peruse our Topics section for help troubleshooting your SQL Server DBA, developer or management problems

  • This was first published in March 2006

    There are Comments. Add yours.

    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to: