#% Create table SQLファイル作成用の雛型ファイル
#% 2009/04/27 By S.Ito

#! h2 sequence
CREATE SEQUENCE IF NOT EXISTS #sequenceName#
    START WITH 1
	INCREMENT BY 1
	CACHE 1;

#!

#! postgreSQL sequence
CREATE SEQUENCE #sequenceName#
    INCREMENT BY 1
    MINVALUE 1
    NO MAXVALUE
    START WITH 1
	CACHE 1
	NO CYCLE;

#!

#! oracle sequence
CREATE SEQUENCE #sequenceName#
    INCREMENT BY 1
    START WITH 1
    MINVALUE 1
    NOMAXVALUE
    NOCACHE
    NOCYCLE;

#!


#! h2 header
create table #mstName#(
#! h2 item
	#name# #type##option#
#! h2 footer1
);
#! h2 primaryKey
CREATE PRIMARY KEY ON #mstName#(#primaryKey#);
#!
#! h2 footer2
#!

#! oracle header
create table #mstName#(
#! oracle item
	#name# #type##option#
#! oracle footer1
#! oracle primaryKey
	,PRIMARY KEY (#primaryKey#)
#! oracle footer2
);
#!

#! postgreSQL header
create table #mstName#(
#! postgreSQL item
	#name# #type##option#
#! postgreSQL footer1
#! postgreSQL primaryKey
	,PRIMARY KEY (#primaryKey#)
#! postgreSQL footer2
);
#!
