[h2] How to query whether a table exists?

2013-08-21 Thread sandstones
I found a post at http://h2-database.66688.n3.nabble.com/Best-practice-Test-for-existence-of-table-etc-td4024451.html which said that the correct method was: select count(*) from information_schema.tables where table_name = ? However, I cannot get any results in doing such a search if I

Re: [h2] How to query whether a table exists?

2013-08-21 Thread Ryan How
works for me. you want IS NOT NULL, IS NULL instead of = null This is what I did SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'FILE_RESOURCE' SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'FILE_RESOURCE';