Here you can find the source of createTable2()
public static void createTable2() throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class Main { private static String protocol = "jdbc:derby:"; private static String dbName = "db"; public static void createTable2() throws SQLException { Connection conn = DriverManager.getConnection(protocol + dbName + ";create=true"); Statement st = conn.createStatement(); String sql = "create table whore2(id bigint primary key,obj blob)"; st.execute(sql);/* w w w. j a va 2 s. co m*/ st.close(); conn.close(); } }