String CREATEHORSETABLE =
"create table Horse " +
"(name varchar(20) NOT NULL, term smallint NOT NULL, " +
"place smallint NOT NULL, day smallint NOT NULL, " +
"rnum smallint NOT NULL, date date NOT NULL, frame smallint, " +
"number smallint, ordernumber smallint, time smallint, " +
"popularity smallint, weight smallint, loadweight real, " +
"threefurlong real, odds real, passorder char(20), " +
"PRIMARY KEY(name, date))";
Connection conn = DriverManager.getConnection("jdbc:derby:/Users/tkydevelop/Documents/workspace/HorseRaceAnalyzer/db;create=true");
Statement s = conn.createStatement();
s.execute(CREATEHORSETABLE);
のようにしてテーブルを作成した。
0 件のコメント:
コメントを投稿