R
raffaele castagno
Il Sun, 08 Aug 2004 23:46:11 +0530, Manish Hatwalne ha scritto:
AFAIK, if you try to access a table wich does not exist, JDBS should raise
a DataAccessException, if I remember right... You can try to run a query
on the table you want to check, and catch that exception.
Read MySql JDBC driver and Java JDBC documentation for details, and of
course wait the answer of developer more experienced than me...
Bye
Raffaele
This should be easy, but I am unable to find it now.
How can I detect if a particular table exists or not in my DB (I am using
MySQL).
I cannot delete table, so I can't use drop if exists; but can I use count
(*) if exists, or sth similar? I am not much of a DB person.
Any pointers would be very useful.
AFAIK, if you try to access a table wich does not exist, JDBS should raise
a DataAccessException, if I remember right... You can try to run a query
on the table you want to check, and catch that exception.
Read MySql JDBC driver and Java JDBC documentation for details, and of
course wait the answer of developer more experienced than me...
Bye
Raffaele