Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 || Sign in SQL Query

Author  Topic 

SQLBoy14
Yak Posting Veteran

70 Posts

Posted - 2014-08-10 : 23:46:47
I am wondering what is the || in sql query for?

Thank you

SQLBoy

robvolk
Most Valuable Yak

15732 Posts

Posted - 2014-08-11 : 07:06:36
For Oracle and DB2 (and maybe others) it's the string concatenation operator:
SELECT 'A' || 'B'  -- AB
SQL Server uses + for string concatenation:
SELECT 'A' + 'B'
Go to Top of Page

SQLBoy14
Yak Posting Veteran

70 Posts

Posted - 2014-08-12 : 23:18:03
Thank you robvolk. That's helped.

SQLBoy
Go to Top of Page
   

- Advertisement -