[ACCEPTED]-how do I make a select which always returns zero rows-jdbc
Accepted answer
SELECT * FROM tableName WHERE 'You' = 'Smart'
0
...or you could just use the DatabaseMetaData 2 route.
There's a "getColumns" method that 1 does what you need without creating a resultset.
SELECT * FROM table_name WHERE 1 = 2;
0
select * from tablename where 1 != 1
0
Unrelated, but if you just need the columns 2 in MySQL, you can run SHOW FIELDS FROM tablename. This 1 returns columns and the associated info.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.