Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find out if a table exists

 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the methods available in the DatabaseMetaData class.
It's in the java.sql package.
 
Apu Nahasapeemapetilon
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this a java question or a DB (database) question?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic