Code examples : T-SQL Tuesday #143
It’s TSQL Tuesday! John Armando McCormack (blog|twitter) is our host this month and he’d like us to share some of ... Continue reading
2021-10-12
30 reads
It’s TSQL Tuesday! John Armando McCormack (blog|twitter) is our host this month and he’d like us to share some of ... Continue reading
2021-10-12
30 reads
One of the easiest ways to collect information about table activity is to add a series of audit columns to ... Continue reading
2021-10-11 (first published: 2021-09-28)
494 reads
Deleting rows from a table is a pretty simple task right? Not always. Foreign keys, while providing a ton of ... Continue reading
2021-10-07
78 reads
Here are some really common questions I get: How many CPUs does ServerA have? How much memory does ServerA have? ... Continue reading
2021-10-05
51 reads
In my last post I talked about invoke-sqlcmd. It’s a nice easy way to run a query or a .sql ... Continue reading
2021-10-04 (first published: 2021-09-21)
615 reads
As with all programming tasks there are a number of ways to do something, this is just one that I ... Continue reading
2021-09-27 (first published: 2021-09-16)
541 reads
Quick query today. I needed a list of database sizes so came up with this: Nothing exciting, but I figure ... Continue reading
2021-09-22 (first published: 2021-09-14)
431 reads
In my house, this is rule one. Sometimes it’s my wife or I reminding our kids, sometimes it’s them reminding ... Continue reading
2021-09-17 (first published: 2021-08-31)
331 reads
Last month I had you create a security standards document. This month we are going to document our recovery plan. ... Continue reading
2021-09-15 (first published: 2021-09-02)
245 reads
The other day I was creating a table to store some metadata. Since the metadata I was collecting (sys.databases.name for ... Continue reading
2021-09-10 (first published: 2021-08-26)
183 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