What is the difference between ' OR
' and ' ||
'in postgreSQL?
SQL:
select distinct(us.email), us.id from users us left join aliases al on al.user_name like us.email `||` '_%' where us.email;
Sql pulls different data depending on whether it is OR
or ||
. Why?
||
is a string concatenation. If you put OR in your example, then there will be a syntax error - MikeOR
is also a logical operator, and||
too concatenation? - Giovanni