svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.db / org.gvsig.fmap.dal.db.h2 / src / test / resources / org / gvsig / fmap / dal / store / h2 / createTable.sql @ 44678
History | View | Annotate | Download (904 Bytes)
1 | 44678 | jjdelcerro | |
---|---|---|---|
2 | -- Se usa en TestCreateTable.
|
||
3 | -- Se corresponde con el fichero CSV "testCreateSource1.csv".
|
||
4 | |||
5 | CREATE TABLE "PUBLIC"."test" ( |
||
6 | "ID" INTEGER PRIMARY KEY NOT NULL, |
||
7 | "Byte" TINYINT DEFAULT NULL, |
||
8 | "Bool1" BOOLEAN DEFAULT NULL, |
||
9 | "Long" BIGINT DEFAULT NULL, |
||
10 | "Timestamp" TIMESTAMP DEFAULT NULL, |
||
11 | "Date" DATE DEFAULT NULL, |
||
12 | "Time" TIME DEFAULT NULL, |
||
13 | "Bool2" BOOLEAN DEFAULT NULL, |
||
14 | "String" VARCHAR(30) DEFAULT NULL, |
||
15 | "Bool3" BOOLEAN DEFAULT NULL, |
||
16 | "Double" DOUBLE DEFAULT NULL, |
||
17 | "Bool4" BOOLEAN DEFAULT NULL, |
||
18 | "Float" REAL DEFAULT NULL, |
||
19 | "Bool5" BOOLEAN DEFAULT NULL, |
||
20 | "Decimal" DECIMAL(6,3) DEFAULT NULL, |
||
21 | -- H2 Spatial usa la constraint para averiguar el tipo de geometria,
|
||
22 | -- la dimension de esta (2D,3D,...) y el SRID.
|
||
23 | "Geometry" GEOMETRY(1) CHECK NVL2("Geometry", ST_GeometryTypeCode("Geometry") = 1 AND ST_CoordDim("Geometry") = 2 AND ST_SRID("Geometry") = 4326, TRUE) |
||
24 | ); |