Amusing SQL Trick – Hide yourself from SQL Server
I make a point of reading DBAReactions on a fairly regular basis and today while reading it I was lead...
2013-07-17
826 reads
I make a point of reading DBAReactions on a fairly regular basis and today while reading it I was lead...
2013-07-17
826 reads
I was researching a problem with a partitioned table that had somehow become unpartitioned and discovered something rather interesting.
First here...
2013-07-22 (first published: 2013-07-15)
2,544 reads
Generally if I need to do any form of complicated control flow I’ll end up using SSIS, however there is...
2013-07-15 (first published: 2013-07-08)
2,187 reads
A little while back I wrote Best practice recommendations for writing Dynamic SQL where I made a number of suggestions...
2013-07-01
2,713 reads
How will you back out if your change doesn’t work?! Always take a backup! There should always be a back...
2013-06-26
2,418 reads
What is a metadata function? According to BOL a metadata function is one that returns data about the database or...
2013-06-24
808 reads
I’m going to get slammed for the title by someone but I stand by it. First some definitions.
Disaster Recovery...
2013-06-20
931 reads
Have you ever needed to order by a calculated column? You might have written it something like this:
SELECT LoginID, YEAR(HireDate)...
2013-06-19 (first published: 2013-06-17)
2,769 reads
Note this is not “Best Practices when USING Dynamic SQL”. These are just good habits I’ve come up with over...
2013-06-13 (first published: 2013-06-12)
5,572 reads
Over the last few years I’ve learned quite a bit about different techniques in SQL Server. This particular one has...
2013-06-10
679 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...
Comments posted to this topic are about the item Function Defaults
Comments posted to this topic are about the item Big Data or Small Data
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