Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Find out if a table exists  RSS feed

 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • 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
Boost this thread!