wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 1845
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Find out if a table exists
 
Similar Threads
CHECK IF A TABLE ALREADY EXISTS
Tricky Update Statement
hibernateTemplate.saveOrUpdate(...) issue
How can I set my own table row key for Trinidad's table tag?
How can I set my own table row key for Trinidad's table tag?