Skip to content

Instantly share code, notes, and snippets.

@osya
Created December 13, 2014 17:17
Show Gist options
  • Save osya/8a37dd509a4b548e5391 to your computer and use it in GitHub Desktop.
Save osya/8a37dd509a4b548e5391 to your computer and use it in GitHub Desktop.
Default value for stored procedures parameter have to be constants. You'd need to do the following... #SQL
ALTER Procedure [dbo].[my_sp]@currentDate datetime = nullASIF @currentDate IS nullSET @currentDate = getdate()
URL: http://stackoverflow.com/questions/470664/sql-function-as-default-parameter-value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment