简体   繁体   中英

Difference between 'OR' and '||' in SQL?

What's the difference between ' OR ' and ' || ' in SQL?

OR is boolean operator, eg

   (a = b) OR (c = d)

when || is string concatenation , eg

  'a' || 'b'

In SQL 'OR' is an operator that specifies that either of two conditions needs to be met, while '||' is concatenation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM