MariaDB allows defaults of column names
[dbsrgits/SQL-Translator.git] / t / data / mysql / create.sql
1 create table person (
2   person_id INTEGER PRIMARY KEY,
3   name varchar(20),
4   age integer,
5   weight double(11,2),
6   iq tinyint default '0',
7   description text default `name`,
8   UNIQUE KEY UC_age_name (age)
9 ) ENGINE=MyISAM;
10
11 create unique index u_name on person (name);
12
13 create table employee (
14   position varchar(50),
15   employee_id integer,
16   job_title varchar(255),
17   CONSTRAINT FK5302D47D93FE702E FOREIGN KEY (employee_id) REFERENCES person (person_id),
18   CONSTRAINT `demo_constraint` CHECK (`employee_id` > 0 and `employee_id` IS NOT NULL),
19   PRIMARY KEY  (position, employee_id) USING BTREE
20 ) ENGINE=InnoDB;
21
22 create table deleted (
23   id integer
24 );