Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / database / SQL-Server

Default keyword in SQL Server

5.00/5 (3 votes)
12 Jun 2011CPOL 26.5K  
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)