how do I make a select which always returns zero rows
java, jdbc, sql
Solution
SELECT * FROM tableName WHERE 'You' = 'Smart'
Problem
I want to determine if a column exists in a table for any jdbc driver. In order to know the columns in a table, I have to make a query to the table and then get the ResultSetMetaData for the info, but this is pretty expensive in like 99% of times. In mysql I have: `SELECT * FROM tablename LIMIT 0,0` In Intersystems caché I have: `SELECT TOP 0 * FROM tablename` But, for example, in JavaDB I cannot apply any limit at all. Is there any generic query that would give me the same result and still be fair with the DB performance? Thanks in advance.