Adding a column to a table with a default (NULL vs NOT NULL)
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is...
2013-11-05 (first published: 2013-10-30)
5,073 reads
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is...
2013-11-05 (first published: 2013-10-30)
5,073 reads
Everyone knows that we should include comments in our code right? On the other hand the vast majority of us...
2013-10-29 (first published: 2013-10-21)
1,732 reads
It’s one of those things that always aggravated me but not really enough to complain about. When you run a...
2013-10-28
691 reads
Yes I’m talking about FETCH as in a cursor, yes everyone hates cursors. But you know cursors are like anything...
2013-10-23
704 reads
This happens to me all the time. I get a request from a developer to overwrite the test copy of...
2013-10-16 (first published: 2013-10-09)
2,660 reads
We have a set of databases at my office that use the load and swap method of loading data with...
2013-10-16
1,199 reads
Personally I’ve always enjoyed learning the T-SQL for any given task. The GUI is usually pretty easy to figure out...
2013-10-14
1,003 reads
Both TOP and SET ROWCOUNT are both valid methods of limiting the result sets from a query. They are however...
2013-10-10 (first published: 2013-10-07)
3,955 reads
It’s time for T-SQL Tuesday again and this time Kendal Van Dyke is asking for Your Best SQL Server SWAG....
2013-10-08
743 reads
I absolutely love learning new tricks that can be done in SSMS. Everything from opening initial connections to both the...
2013-10-02
884 reads
By Steve Jones
This is my last week of the year working (I guess I come back...
By Steve Jones
This is my last week of the year working (I guess I come back...
Want to seriously boost your data skills? Mastering advanced SQL is the key, whether...
I have an ADF pipeline that copies Files from source to destination. Both Source...
Comments posted to this topic are about the item Function Defaults
I have created this function in SQL Server 2022:
CREATE FUNCTION dbo.AddInt (@one INT, @two INT = 1) RETURNS INT AS BEGIN RETURN @one + @two ENDHow can I call this and invoke the default value for @two? See possible answers