diff options
author | Wilrik de Loose <wilrik@wilrik.nl> | 2008-05-27 09:50:18 (GMT) |
---|---|---|
committer | Wilrik de Loose <wilrik@wilrik.nl> | 2008-05-27 09:50:18 (GMT) |
commit | e2b5d9764888e0f307ebcdf9c20835b197a0f63c (patch) | |
tree | 00bf9c6fbc7dae49d14ac91d44fe5e3f20d1454d /db_demo/sql/tables/cr_tbl_test.sql | |
parent | 9b5236ed96a79e0fe979e2d7a7bc7173170af6cf (diff) | |
download | 2iv55-e2b5d9764888e0f307ebcdf9c20835b197a0f63c.zip 2iv55-e2b5d9764888e0f307ebcdf9c20835b197a0f63c.tar.gz 2iv55-e2b5d9764888e0f307ebcdf9c20835b197a0f63c.tar.bz2 |
db functies
Diffstat (limited to 'db_demo/sql/tables/cr_tbl_test.sql')
-rw-r--r-- | db_demo/sql/tables/cr_tbl_test.sql | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/db_demo/sql/tables/cr_tbl_test.sql b/db_demo/sql/tables/cr_tbl_test.sql index 15e94d0..63b861b 100644 --- a/db_demo/sql/tables/cr_tbl_test.sql +++ b/db_demo/sql/tables/cr_tbl_test.sql @@ -1,7 +1,8 @@ CREATE SEQUENCE seq_test START 1;
CREATE TABLE tbl_test (
- key integer PRIMARY KEY, -- primary key
+ key integer DEFAULT nextval('seq_test') PRIMARY KEY, -- primary key
personid integer NOT NULL REFERENCES tbl_person(key), -- person foreign key
- gametypeid integer NOT NULL REFERENCES const_gametype(key) -- gametype foreign key
+ gametypeid integer NOT NULL REFERENCES const_gametype(key), -- gametype foreign key
+ inserttime timestamp DEFAULT current_timestamp -- time of insertion
);
\ No newline at end of file |