December 1, 2025 at 12:00 am
Comments posted to this topic are about the item A New Operator
December 1, 2025 at 9:30 pm
How do a bunch of people in a design meeting sitting around a table have a conversation like this:
"Let's add a new concatenation operator to T-SQL. We don't really need one and there are lots of things we do need but this will be fun."
"Good idea, let's use '||'"
"In all our other languages that is the 'OR' operator so it will be counter-intuitive."
"That's why it's the perfect choice!"
--- Everybody laughing ---
"Done!"
ewm2
December 1, 2025 at 10:21 pm
How do a bunch of people in a design meeting sitting around a table have a conversation like this:
"Let's add a new concatenation operator to T-SQL. We don't really need one and there are lots of things we do need but this will be fun."
"Good idea, let's use '||'"
"In all our other languages that is the 'OR' operator so it will be counter-intuitive."
"That's why it's the perfect choice!"
--- Everybody laughing ---
"Done!"
Not quite - in other SQL languages and ANSI SQL the double-pipe operator is the default string concatenation operator. So - basically we have the team sitting around and saying:
"It has only been 30+ years that we have not implemented the default concatenation operator - we have nothing better to do so let's do that now!"
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 1, 2025 at 11:29 pm
Thanks for the lesson. I am developer first but have used SQL Server since 6.5, Sybase, Mongo DB (doesn't really count for this discussion), MySQL, and Postgres. I have never used the || operator in any of them but now I know. I'll probably throw it in some code just to confuse people - taking my lead from MS.
ewm2
December 4, 2025 at 5:34 am
Remember using this in DB2 on a mainframe in the 90's.
In DB2, it was CONCAT for strings and OR for numerical values
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply