aspose file tools*
The moose likes JDBC and the fly likes Find out if a table exists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Find out if a table exists" Watch "Find out if a table exists" New topic
Author

Find out if a table exists

Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1836
Hi
How can i find out whether a table exists. If a tabel exists then i want to add a record to it. If it does not i want to create a new table and then add a record to it.
Regds.
Rahul.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
You can use the methods available in the DatabaseMetaData class.
It's in the java.sql package.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Apu Nahasapeemapetilon
Ranch Hand

Joined: Sep 06, 2000
Posts: 51
is this a java question or a DB (database) question?
 
wood burning stoves
 
subject: Find out if a table exists
 
Similar Threads
Tricky Update Statement
How can I set my own table row key for Trinidad's table tag?
CHECK IF A TABLE ALREADY EXISTS
hibernateTemplate.saveOrUpdate(...) issue
How can I set my own table row key for Trinidad's table tag?