I’ve written a query in MySQL which is :-
SELECT * FROM `employees` WHERE ((first_name LIKE "s%" OR middle_name LIKE "s%" OR last_name LIKE "s%")) ORDER BY first_name ASC;
I tried to executed this query in PostgreqSQL but it gives an error which says column “s%” does not exist.
After that I put single quote in LIKE statements instead of double qoutes.
SELECT * FROM `employees` WHERE ((first_name LIKE 's%' OR middle_name LIKE 's%' OR last_name LIKE 's%')) ORDER BY first_name ASC;
Now PostgreSQL executes that query but it returns an empty set.
I’m using postgreSQL 8.3
The second statement will not run in PostgreSQL due to the invalid backticks around employees – but maybe that is a copy & paste error.
If you actually removed those dreaded backticks (which are not even necessary in MySQL) most probably the second statement did not return any values, because string comparison in PostgreSQL is case-sensitive and your columns contain a captial
Sinstead ofsTry: