fn_OBJECT_TYPE
I recently started using OBJECT_NAME, OBJECT_SCHEMA_NAME and OBJECT_ID functions; unfortunately I really could have used OBJECT_TYPE but it doesn’t exist...
2012-10-19
1,234 reads
I recently started using OBJECT_NAME, OBJECT_SCHEMA_NAME and OBJECT_ID functions; unfortunately I really could have used OBJECT_TYPE but it doesn’t exist...
2012-10-19
1,234 reads
I recently passed my MCTS 2008 Development (70-433). Yay me! That made my 3rd 2008 certification. This one was probably the...
2012-10-15
1,839 reads
Multiple CTEs
It’s somewhat obscure in BOL and I wasn’t able to find any examples but it turns out you can...
2012-10-11 (first published: 2012-10-09)
4,560 reads
I’ve been unable to connect to a server via one of its aliases for about a week. When I looked...
2012-10-05
1,932 reads
I work with a reasonably large team of DBAs. There are 9 of us and we support not only 70+...
2012-10-02
1,197 reads
I’ve always found clusters a pain in the neck. For my latest pain I just spent the last 2 days...
2012-09-26
625 reads
A couple of days ago I read Steve Jones’ blog on creating a user defined table type. This reminded me...
2012-09-25
1,174 reads
I recently turned on OPTIMIZE FOR AD HOC WORKLOADS for the first time on one of my servers. When I...
2012-09-18
1,352 reads
As a database administrator I get lots of security requests. “Please grant me read authority on this table, write on that table,...
2012-09-10
727 reads
My manager has been quietly laughing under his breath at me for years. Usually because I much prefer queries and...
2012-09-02
4,108 reads
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...
By Steve Jones
This is my last week of the year working (I guess I come back...
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