PageRenderTime 23ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/hippo-migrate/do/00010-do_CreateData.sql

http://hdbc.googlecode.com/
SQL | 25 lines | 20 code | 3 blank | 2 comment | 0 complexity | 2ac687e36983fa6ee3637aec8c911aa7 MD5 | raw file
 1VARIABLE v_pk  NUMBER;
 2
 3BEGIN
 4    hippo.sp_log_version_change_begin('00010-do_CreateData.sql', &1, :v_pk);
 5END;
 6/
 7
 8---- ddl below ------------------------------------------
 9CREATE TABLE hippo.data (
10	data_cd 		number CONSTRAINT pk_data PRIMARY KEY,
11	user_cd			number,
12	experiment_cd	number,
13	response		XMLType NOT NULL,
14	CONSTRAINT fk_data_to_users FOREIGN KEY (user_cd) REFERENCES hippo.users
15);
16---------------------------------------------------------
17
18BEGIN
19    hippo.sp_update_version(10);
20    hippo.sp_log_version_change_finish(:v_pk, 'success');
21EXCEPTION
22    WHEN OTHERS THEN
23        hippo.sp_log_version_change_finish(:v_pk, 'fail');
24END;
25/