Click here to Skip to main content
15,867,453 members
Articles / Database Development / SQL Server
Tip/Trick

Default keyword in SQL Server

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
12 Jun 2011CPOL 25.3K   4   3
Default keyword in SQL Server
I discovered a handy little trick today with regard to calling SQL Server objects:

http://www.dba-sql-server.com/sql_server_tips/t_super_sql_439_default_keyword.htm[^]

You can use this in a database where you have many, many nested function calls. Essentially, if you have a default specified on a parameter in the middle of the parameter list, you can call that default using the "default" keyword. So if it changes later, you don't have to go searching for references to the function and change them all back.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect UBS AG
Switzerland Switzerland
Mel Padden:

Musician, papier maché guru, international authority on the modern crisp, and sometime software developer based in Zurich, Switzerland and Dublin, Ireland.

http://www.linkedin.com/in/melpadden

Comments and Discussions

 
GeneralNice Pin
Shahriar Iqbal Chowdhury/Galib12-Jun-11 20:27
professionalShahriar Iqbal Chowdhury/Galib12-Jun-11 20:27 
GeneralReason for my vote of 5 Nice Pin
Shahriar Iqbal Chowdhury/Galib12-Jun-11 20:27
professionalShahriar Iqbal Chowdhury/Galib12-Jun-11 20:27 
Generalnice link, my 5. Pin
Monjurul Habib9-Jun-11 10:44
professionalMonjurul Habib9-Jun-11 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.