セットアップ用SQLファイル / インポートDDL / インポートDML 記法¶
SQL分の終端にはセミコロン”;”を記述してください。ひとつのSQLファイルには複数のSQL文の記述が可能です。
- DDLの例
CREATE TABLE im_administrator ( user_cd VARCHAR(100) NOT NULL, password VARCHAR(255), locale_id VARCHAR(20), encoding VARCHAR(20), time_zone_id VARCHAR(128), telephone_number VARCHAR(50), email_address VARCHAR(256), create_user_cd VARCHAR(100) NOT NULL, create_date TIMESTAMP NOT NULL, record_user_cd VARCHAR(100) NOT NULL, record_date TIMESTAMP NOT NULL, PRIMARY KEY (user_cd) ); CREATE TABLE im_tenant_info ( tenant_id VARCHAR(100) NOT NULL, locale_id VARCHAR(20) NOT NULL, encoding VARCHAR(20), time_zone_id VARCHAR(128), calendar_id VARCHAR(20), first_day_of_week DECIMAL(1) NOT NULL, home_url VARCHAR(1024), email_address VARCHAR(256) NOT NULL, lock_count DECIMAL(15) NOT NULL, lock_term DECIMAL(15) NOT NULL, create_user_cd VARCHAR(100) NOT NULL, create_date TIMESTAMP NOT NULL, record_user_cd VARCHAR(100) NOT NULL, record_date TIMESTAMP NOT NULL, PRIMARY KEY (tenant_id) ); ・ ・ ・
- DMLの例
insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_0','ja','0','申請標準','1','申請標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_1','ja','1','一時保存標準','1','一時保存標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_2','ja','2','未処理標準','1','未処理標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_3','ja','3','処理済(未完了)標準','1','処理済(未完了)標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_4','ja','4','処理済(完了)標準','1','処理済(完了)標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_5','ja','5','過去案件標準','1','過去案件標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_6','ja','6','参照(未完了)標準','1','参照(未完了)標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_7','ja','7','参照(完了)標準','1','参照(完了)標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_8','ja','8','確認(未完了)標準','1','確認(未完了)標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_list_pattern (pattern_id,locale_id,list_page_type,pattern_name,default_flag,note,update_count,create_user_code,update_user_code,create_date,update_date) values ('default_pattern_9','ja','9','確認(完了)標準','1','確認(完了)標準パターン','1','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_mail_template (mail_id,locale_id,mail_template_name,note,mail_template_path,update_count,create_user_code,update_user_code,create_date,update_date) values ('processing','ja','処理依頼','処理依頼用の標準メールテンプレート','im_workflow/data/^^^GROUP_ID^^^/^^^MASTER_FILE_DIR^^^/mail/processing_ja.xml','0','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_mail_template (mail_id,locale_id,mail_template_name,note,mail_template_path,update_count,create_user_code,update_user_code,create_date,update_date) values ('result','ja','処理結果通知','処理結果通知用の標準メールテンプレート','im_workflow/data/^^^GROUP_ID^^^/^^^MASTER_FILE_DIR^^^/mail/result_ja.xml','0','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); insert into imw_m_mail_template (mail_id,locale_id,mail_template_name,note,mail_template_path,update_count,create_user_code,update_user_code,create_date,update_date) values ('reference','ja','参照依頼','参照依頼用の標準メールテンプレート','im_workflow/data/^^^GROUP_ID^^^/^^^MASTER_FILE_DIR^^^/mail/reference_ja.xml','0','intra-mart','intra-mart',to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-08-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss')); ・ ・ ・SQL文中のコメントには対応していません。 コメントは記述しないでください。