Results 1 to 2 of 2
Thread: how to determine the primary key
- 08-01-2007, 02:31 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 26
- Rep Power
- 0
- 08-07-2007, 02:31 AM #2
Member
- Join Date
- Jul 2007
- Posts
- 36
- Rep Power
- 0
java.sql interface DatabaseMetaData
ResultSet getPrimaryKeys (String catalog,String schema,String table)throws SQLException
Retrieves a description of the given table's primary key columns. They are ordered by COLUMN_NAME.
Each primary key column description has the following columns:
TABLE_CAT String => table catalog (may be null)
TABLE_SCHEM String => table schema (may be null)
TABLE_NAME String => table name
COLUMN_NAME String => column name
KEY_SEQ short => sequence number within primary key
PK_NAME String => primary key name (may be null)
Parameters:
catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
table - a table name; must match the table name as it is stored in the database
Returns:
ResultSet - each row is a primary key column description
Throws:
SQLException - if a database access error occurs
Similar Threads
-
How to determine CPU usage using Java?????
By JavaEmpires in forum New To JavaReplies: 5Last Post: 03-16-2011, 04:49 AM -
JCombox DropDown is displayed on primary monitor when the box is in between two monit
By Kalpana.k in forum AWT / SwingReplies: 1Last Post: 05-01-2008, 03:19 PM -
How to determine all the IP addresses of machines on local LAN??
By JavaEmpires in forum NetworkingReplies: 3Last Post: 01-19-2008, 06:05 AM -
How to determine if the value of a JTextField is double
By nemo in forum New To JavaReplies: 1Last Post: 05-20-2007, 11:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks