I'm using the following query on my MySQL database:
SELECT * FROM users WHERE CONCAT(first_name, ' ', last_name) = 'John Doe'
I also have a PostgreSQL 8.4 database and i tried running the same query on that but get error that it does not recognise the CONCAT function.
Any ideas how I can achieve the same query on my postgresql ?
Thanks
You can use postgres' concatenation operator
||:Although you may find the following to be better suited for your condition to avoid doing expensive concatenations: