Is there a way to create a query to select only the first result that's compatible for both MySQL and SQL Server?
SELECT TOP 1 mycolumn, mycolumn2
FROM mytable
ORDER BY ID DESC
works for SQL Server.
but
SELECT mycolumn, mycolumn2
FROM mytable
ORDER BY ID DESC
LIMIT 1
works only for MySQL.
I'm not looking to download any PDO or database abstraction class - I'm wondering if there are SQL queries compatibility to both?