This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 1864
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
 
jQuery in Action, 3rd edition