File: tables_mysql.sql

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (44 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (2)
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


-- test table with all MySQL 5.5 datatypes
create table alltypes (
    -- numeric types
    num_tinyint TINYINT,
    num_smallint SMALLINT,
    num_mediumint MEDIUMINT,
    num_int INT,
    num_bigint BIGINT,
    --
    num_decimal DECIMAL(65, 5),
    num_numeric NUMERIC(65, 5),
    -- 
    num_float FLOAT,
    num_double DOUBLE,
    -- bit
    bit_1 BIT(1),
    bit_64 BIT(64),
    -- date and time
    dt_date DATE,
    dt_datetime DATETIME,
    dt_timestamp TIMESTAMP,
    dt_time TIME,
    dt_year YEAR(4),
    -- string
    str_char CHAR(255),
    str_varchar VARCHAR(10000),
    str_binary BINARY(255),
    str_varbinary VARBINARY(10000),
    -- blob
    bl_tinyblob TINYBLOB,
    bl_blob BLOB,
    bl_mediumblob MEDIUMBLOB,
    bl_longblob LONGBLOB,
    bl_tinytext TINYTEXT,
    bl_text TEXT,
    bl_mediumtext MEDIUMTEXT,
    bl_longtext LONGTEXT,
    -- enum
    en_enum ENUM('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'),
    -- set
    se_set SET('x', 'y', 'z', 'w')
);