PDA

View Full Version : Existing Tables?


LacyH527
01-03-03, 17:04
I am trying to build a simple JDBC program to create and manipulate databases. What I need to know is how to check before creating a table if the table alreay exists and if its blank or has records. Does anyone have any clue how to do this? I have been searching for days.

omiossec
01-06-03, 08:58
Originally posted by LacyH527
I am trying to build a simple JDBC program to create and manipulate databases. What I need to know is how to check before creating a table if the table alreay exists and if its blank or has records. Does anyone have any clue how to do this? I have been searching for days.

You could test the table with tables in database metadate


Resultset getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)