Here you can find the source of createFreqTable()
public static void createFreqTable()
//package com.java2s; //License from project: Open Source License import java.sql.*; public class Main { static final String FREQ_TABLE = "freq"; static final String ID = "ID"; static final String CHROME = "Chrome"; static final String POSITION = "position"; static final String A = "A"; static final String T = "T"; static final String C = "C"; static final String G = "G"; static Connection connection; public static void createFreqTable() { try {// ww w. j av a2 s. com Statement stmt = connection.createStatement(); String sql = "CREATE TABLE IF NOT EXISTS " + FREQ_TABLE + "(" + ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + CHROME + " CHAR(10) NOT NULL," + POSITION + " CHAR(20) NOT NULL," + A + " CHAR(10)," + T + " CHAR(10)," + C + " CHAR(10)," + G + " CHAR(10), " + "UNIQUE (" + CHROME + "," + POSITION + ")" + ");"; stmt.executeUpdate(sql); stmt.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Create freq table successfully"); } }