Package javatapas.sql

Class GetDatabaseTableColumnNames

java.lang.Object
javatapas.sql.GetDatabaseTableColumnNames

public class GetDatabaseTableColumnNames
extends Object
Return a List containing all Column Names of a specified Table using JDBC.

Published at https://www.javatapas.com/sql/Java-Get-Database-Table-Column-Names.html

Javadoc at https://www.javatapas.com/docs/javatapas/sql/GetDatabaseTableColumnNames.html
Version:
2021-05-29
Author:
Kodiak Brown
  • Constructor Details

    • GetDatabaseTableColumnNames

      public GetDatabaseTableColumnNames()
  • Method Details

    • getDatabaseTableColumnNames

      public static List<String> getDatabaseTableColumnNames​(Connection conn, String tableName) throws SQLException
      Parameters:
      conn - The JDBC Connection object. Note that since this is being passed into the method as a parameter, it does not get closed within the method.
      conn - The name of the table that the column names should be pulled from.
      Throws:
      SQLException