List of usage examples for java.sql Connection getMetaData
DatabaseMetaData getMetaData() throws SQLException;
DatabaseMetaData
object that contains metadata about the database to which this Connection
object represents a connection. From source file:Main.java
public static void main(String[] argv) throws Exception { Connection c = null; DatabaseMetaData dbm = c.getMetaData(); ResultSet rs = dbm.getTables(null, null, "employee", null); if (rs.next()) { System.out.println("Table exists"); } else {/* w w w .j a va 2s . com*/ System.out.println("Table does not exist"); } }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxColumnsInSelect()); conn.close();//from w w w .jav a 2 s .co m }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxSchemaNameLength()); conn.close();/*ww w . j a v a 2s . c om*/ }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getJDBCMinorVersion()); conn.close();/*from www . ja v a2 s . c om*/ }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxConnections()); conn.close();/*from w w w . j a v a 2 s . co m*/ }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxColumnNameLength()); conn.close();/*from w w w . j ava 2 s. co m*/ }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxColumnsInOrderBy()); conn.close();//w w w .ja v a 2s . c o m }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxProcedureNameLength()); conn.close();// w w w. ja va 2s . co m }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxCharLiteralLength()); conn.close();/*from w w w .ja v a 2s . c o m*/ }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println(md.getMaxCatalogNameLength()); conn.close();/*from ww w . j a va 2 s .co m*/ }