-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathtest.sql
More file actions
92 lines (87 loc) · 2.11 KB
/
test.sql
File metadata and controls
92 lines (87 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// *****************************************************
// Copyright (c) 2008-2012 iAnywhere Solutions, Inc.
// Portions copyright (c) 2008-2012 Sybase, Inc.
// All rights reserved. All unpublished rights reserved.
// *****************************************************
IF EXISTS( SELECT * FROM "SYS"."SYSTAB" WHERE "table_name" = 'test') THEN
DROP TABLE "test";
END IF;
IF EXISTS( SELECT * FROM "SYS"."SYSTAB" WHERE "table_name" = 'types') THEN
DROP TABLE "types";
END IF;
CREATE TABLE "test" (
"id" INTEGER NOT NULL DEFAULT AUTOINCREMENT,
PRIMARY KEY("id")
);
CREATE TABLE "types" (
"id" INTEGER PRIMARY KEY,
"_binary_" BINARY(8) DEFAULT NULL,
"_numeric_" NUMERIC(2,1),
"_decimal_" DECIMAL(2,1),
"_bounded_string_" CHAR(255) DEFAULT NULL,
"_unbounded_string_" LONG VARCHAR DEFAULT NULL,
"_signed_bigint_" BIGINT DEFAULT NULL,
"_unsigned_bigint_" UNSIGNED BIGINT DEFAULT NULL,
"_signed_int_" INTEGER DEFAULT NULL,
"_unsigned_int_" UNSIGNED INTEGER DEFAULT NULL,
"_signed_smallint_" SMALLINT DEFAULT NULL,
"_unsigned_smallint_" UNSIGNED SMALLINT DEFAULT NULL,
"_signed_tinyint_" TINYINT DEFAULT NULL,
"_unsigned_tinyint_" UNSIGNED TINYINT DEFAULT NULL,
"_bit_" BIT,
"_date_" DATE DEFAULT NULL,
"_datetime_" DATETIME DEFAULT NULL,
"_smalldatetime_" SMALLDATETIME DEFAULT NULL,
"_timestamp_" TIMESTAMP DEFAULT NULL,
"_double_" DOUBLE DEFAULT NULL,
"_float_" FLOAT DEFAULT NULL,
"_real_" REAL DEFAULT NULL
);
INSERT INTO types VALUES
( 0,
CAST ( 0x78 AS BINARY ),
1.1,
1.1,
'Bounded String Test',
'Unbounded String Test',
9223372036854775807,
18446744073709551615,
2147483647,
4294967295,
32767,
65535,
255,
255,
1,
DATE( '1999-01-02 21:20:53' ),
DATETIME( '1999-01-02 21:20:53' ),
DATETIME( '1999-01-02 21:20:53' ),
DATETIME( '1999-01-02 21:20:53' ),
1.79769313486231e+308,
3.402823e+38,
3.402823e+38
)
INSERT INTO types VALUES
( 1,
CAST ( 0xFF AS BINARY ),
-1.1,
-1.1,
'',
'',
-9223372036854775808,
0,
-2147483648,
0,
-32768,
0,
0,
0,
0,
NULL,
NULL,
NULL,
NULL,
-1.79769313486231e+308,
-3.402823e+38,
-3.402823e+38
)