Java SQL Table Create createTable(Connection connection)

Here you can find the source of createTable(Connection connection)

Description

create Table

License

Open Source License

Declaration

public static void createTable(Connection connection) throws SQLException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class Main {
    private static final String CREATE_TABLE_QUERY = "CREATE TABLE matchervalue(\n" + "\tid bigint PRIMARY KEY,\n"
            + "\ttype integer,\n" + "\tvalue varchar(255),\n" + "\tmatcherid varchar(255),\n"
            + "\tdao_created bigint,\n" + "\tdao_updated bigint\n" + ")";

    public static void createTable(Connection connection) throws SQLException {
        Statement statement = connection.createStatement();
        statement.execute(CREATE_TABLE_QUERY);
    }/*from  www .  j av a  2s .  c o m*/
}

Related

  1. createTable(Connection conn, String createTableStatement)
  2. createTable(Connection conn, String inputSqlType, String sortOrder)
  3. createTable(Connection conn, String sqlText)
  4. createTable(Connection dbConn, String tableName, String columnSpec)
  5. createTable(String query)
  6. createTableAndLoadData(Statement stmt, String tableName)
  7. createTestTable(Connection conn)