65.9K
CodeProject is changing. Read more.
Home

Default keyword in SQL Server

starIconstarIconstarIconstarIconstarIcon

5.00/5 (3 votes)

Jun 8, 2011

CPOL
viewsIcon

26534

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.