1 -- $Header: /home/faga/work/sqlfairy_svn/sqlfairy-cvsbackup/sqlfairy/t/data/mysql/entire_syntax.sql,v 1.2 2003-08-17 01:41:48 rossta Exp $
4 DROP TABLE IF EXISTS t01;
21 c04 VARCHAR(10) BINARY,
22 -- c05 NATIONAL CHAR(10),
23 -- c06 NATIONAL VARCHAR(10),
24 -- c07 NATIONAL CHAR(10) BINARY,
25 -- c08 NATIONAL VARCHAR(10) BINARY,
40 e01 ENUM('value1','value2'),
41 -- s01 SET('value1','value2'), -- not supported
51 r13 DOUBLE PRECISION(2,1),
62 -- all data types, NOT NULL
63 DROP TABLE IF EXISTS t02;
66 i02 SMALLINT NOT NULL,
67 i03 MEDIUMINT NOT NULL,
73 r03 DOUBLE PRECISION NOT NULL,
77 c01 CHAR(10) NOT NULL,
78 c02 VARCHAR(10) NOT NULL,
79 c03 CHAR(10) BINARY NOT NULL,
80 c04 VARCHAR(10) BINARY NOT NULL,
81 -- c05 NATIONAL CHAR(10) NOT NULL,
82 -- c06 NATIONAL VARCHAR(10) NOT NULL,
83 -- c07 NATIONAL CHAR(10) BINARY NOT NULL,
84 -- c08 NATIONAL VARCHAR(10) BINARY NOT NULL,
87 d03 TIMESTAMP NOT NULL,
88 d04 DATETIME NOT NULL,
90 b01 TINYBLOB NOT NULL,
92 b03 MEDIUMBLOB NOT NULL,
93 b04 LONGBLOB NOT NULL,
94 t01 TINYTEXT NOT NULL,
96 t03 MEDIUMTEXT NOT NULL,
97 t04 LONGTEXT NOT NULL,
99 e01 ENUM('value1','value2') NOT NULL,
100 -- s01 SET('value1','value2'), -- not supported
102 i11 TINYINT(1) NOT NULL,
103 i12 SMALLINT(1) NOT NULL,
104 i13 MEDIUMINT(1) NOT NULL,
106 i15 INTEGER(1) NOT NULL,
107 i16 BIGINT(1) NOT NULL,
108 r11 REAL(2,1) NOT NULL,
109 r12 DOUBLE(2,1) NOT NULL,
110 r13 DOUBLE PRECISION(2,1) NOT NULL,
111 r14 FLOAT(1) NOT NULL,
112 r15 FLOAT(2,1) NOT NULL,
113 n11 DECIMAL(1) NOT NULL,
114 n12 DECIMAL(2,1) NOT NULL,
115 n13 NUMERIC(2) NOT NULL,
116 n14 NUMERIC(2,1) NOT NULL,
117 d11 TIMESTAMP(2) NOT NULL,
121 -- all data types, DEFAULT
122 DROP TABLE IF EXISTS t03;
124 i01 TINYINT DEFAULT 0,
125 i02 SMALLINT DEFAULT 0,
126 i03 MEDIUMINT DEFAULT 0,
128 i05 INTEGER DEFAULT 0,
129 i06 BIGINT DEFAULT 0,
131 r02 DOUBLE DEFAULT 0,
132 r03 DOUBLE PRECISION DEFAULT 0,
134 n01 DECIMAL DEFAULT 0,
135 n02 NUMERIC DEFAULT 0,
136 c01 CHAR(10) DEFAULT '',
137 c02 VARCHAR(10) DEFAULT '',
138 c03 CHAR(10) BINARY DEFAULT '',
139 c04 VARCHAR(10) BINARY DEFAULT '',
140 -- c05 NATIONAL CHAR(10) DEFAULT '',
141 -- c06 NATIONAL VARCHAR(10) DEFAULT '',
142 -- c07 NATIONAL CHAR(10) BINARY DEFAULT '',
143 -- c08 NATIONAL VARCHAR(10) BINARY DEFAULT '',
146 d03 TIMESTAMP DEFAULT 0,
147 d04 DATETIME DEFAULT 0,
149 b01 TINYBLOB DEFAULT '',
151 b03 MEDIUMBLOB DEFAULT '',
152 b04 LONGBLOB DEFAULT '',
153 t01 TINYTEXT DEFAULT '',
155 t03 MEDIUMTEXT DEFAULT '',
156 t04 LONGTEXT DEFAULT '',
158 e01 ENUM('value1','value2') DEFAULT 'value1',
159 -- s01 SET('value1','value2'), -- not supported
161 i11 TINYINT(1) DEFAULT 0,
162 i12 SMALLINT(1) DEFAULT 0,
163 i13 MEDIUMINT(1) DEFAULT 0,
164 i14 INT(1) DEFAULT 0,
165 i15 INTEGER(1) DEFAULT 0,
166 i16 BIGINT(1) DEFAULT 0,
167 r11 REAL(2,1) DEFAULT 0,
168 r12 DOUBLE(2,1) DEFAULT 0,
169 r13 DOUBLE PRECISION(2,1) DEFAULT 0,
170 r14 FLOAT(1) DEFAULT 0,
171 r15 FLOAT(2,1) DEFAULT 0,
172 n11 DECIMAL(1) DEFAULT 0,
173 n12 DECIMAL(2,1) DEFAULT 0,
174 n13 NUMERIC(2) DEFAULT 0,
175 n14 NUMERIC(2,1) DEFAULT 0,
176 d11 TIMESTAMP(2) DEFAULT 0,
177 d12 YEAR(2) DEFAULT 0
180 -- all data types, NOT NULL DEFAULT
181 DROP TABLE IF EXISTS t04;
183 i01 TINYINT NOT NULL DEFAULT 0,
184 i02 SMALLINT NOT NULL DEFAULT 0,
185 i03 MEDIUMINT NOT NULL DEFAULT 0,
186 i04 INT NOT NULL DEFAULT 0,
187 i05 INTEGER NOT NULL DEFAULT 0,
188 i06 BIGINT NOT NULL DEFAULT 0,
189 r01 REAL NOT NULL DEFAULT 0,
190 r02 DOUBLE NOT NULL DEFAULT 0,
191 r03 DOUBLE PRECISION NOT NULL DEFAULT 0,
192 r04 FLOAT NOT NULL DEFAULT 0,
193 n01 DECIMAL NOT NULL DEFAULT 0,
194 n02 NUMERIC NOT NULL DEFAULT 0,
195 c01 CHAR(10) NOT NULL DEFAULT '',
196 c02 VARCHAR(10) NOT NULL DEFAULT '',
197 c03 CHAR(10) BINARY NOT NULL DEFAULT '',
198 c04 VARCHAR(10) BINARY NOT NULL DEFAULT '',
199 -- c05 NATIONAL CHAR(10) NOT NULL DEFAULT '',
200 -- c06 NATIONAL VARCHAR(10) NOT NULL DEFAULT '',
201 -- c07 NATIONAL CHAR(10) BINARY NOT NULL DEFAULT '',
202 -- c08 NATIONAL VARCHAR(10) BINARY NOT NULL DEFAULT '',
203 d01 DATE NOT NULL DEFAULT 0,
204 d02 TIME NOT NULL DEFAULT 0,
205 d03 TIMESTAMP NOT NULL DEFAULT 0,
206 d04 DATETIME NOT NULL DEFAULT 0,
207 d05 YEAR NOT NULL DEFAULT 0,
208 b01 TINYBLOB NOT NULL DEFAULT '',
209 b02 BLOB NOT NULL DEFAULT '',
210 b03 MEDIUMBLOB NOT NULL DEFAULT '',
211 b04 LONGBLOB NOT NULL DEFAULT '',
212 t01 TINYTEXT NOT NULL DEFAULT '',
213 t02 TEXT NOT NULL DEFAULT '',
214 t03 MEDIUMTEXT NOT NULL DEFAULT '',
215 t04 LONGTEXT NOT NULL DEFAULT '',
217 e01 ENUM('value1','value2') NOT NULL DEFAULT 'value1',
218 -- s01 SET('value1','value2'), -- not supported
220 i11 TINYINT(1) NOT NULL DEFAULT 0,
221 i12 SMALLINT(1) NOT NULL DEFAULT 0,
222 i13 MEDIUMINT(1) NOT NULL DEFAULT 0,
223 i14 INT(1) NOT NULL DEFAULT 0,
224 i15 INTEGER(1) NOT NULL DEFAULT 0,
225 i16 BIGINT(1) NOT NULL DEFAULT 0,
226 r11 REAL(2,1) NOT NULL DEFAULT 0,
227 r12 DOUBLE(2,1) NOT NULL DEFAULT 0,
228 r13 DOUBLE PRECISION(2,1) NOT NULL DEFAULT 0,
229 r14 FLOAT(1) NOT NULL DEFAULT 0,
230 r15 FLOAT(2,1) NOT NULL DEFAULT 0,
231 n11 DECIMAL(1) NOT NULL DEFAULT 0,
232 n12 DECIMAL(2,1) NOT NULL DEFAULT 0,
233 n13 NUMERIC(2) NOT NULL DEFAULT 0,
234 n14 NUMERIC(2,1) NOT NULL DEFAULT 0,
235 d11 TIMESTAMP(2) NOT NULL DEFAULT 0,
236 d12 YEAR(2) NOT NULL DEFAULT 0
240 -- /*-- all data types, NULL
241 -- /*DROP TABLE IF EXISTS t05;
242 -- /*CREATE TABLE t05 (
243 -- /* i01 TINYINT NULL,
244 -- /* i02 SMALLINT NULL,
245 -- /* i03 MEDIUMINT NULL,
247 -- /* i05 INTEGER NULL,
248 -- /* i06 BIGINT NULL,
250 -- /* r02 DOUBLE NULL,
251 -- /* r03 DOUBLE PRECISION NULL,
252 -- /* r04 FLOAT NULL,
253 -- /* n01 DECIMAL NULL,
254 -- /* n02 NUMERIC NULL,
255 -- /* c01 CHAR(10) NULL,
256 -- /* c02 VARCHAR(10) NULL,
257 -- /* c03 CHAR(10) BINARY NULL,
258 -- /* c04 VARCHAR(10) BINARY NULL,
259 -- /*-- c05 NATIONAL CHAR(10) NULL,
260 -- /*-- c06 NATIONAL VARCHAR(10) NULL,
261 -- /*-- c07 NATIONAL CHAR(10) BINARY NULL,
262 -- /*-- c08 NATIONAL VARCHAR(10) BINARY NULL,
265 -- /* d03 TIMESTAMP NULL,
266 -- /* d04 DATETIME NULL,
268 -- /* b01 TINYBLOB NULL,
270 -- /* b03 MEDIUMBLOB NULL,
271 -- /* b04 LONGBLOB NULL,
272 -- /* t01 TINYTEXT NULL,
274 -- /* t03 MEDIUMTEXT NULL,
275 -- /* t04 LONGTEXT NULL,
277 -- /* e01 ENUM('value1','value2') NULL,
278 -- /*-- s01 SET('value1','value2'), -- supported
280 -- /* i11 TINYINT(1) NULL,
281 -- /* i12 SMALLINT(1) NULL,
282 -- /* i13 MEDIUMINT(1) NULL,
283 -- /* i14 INT(1) NULL,
284 -- /* i15 INTEGER(1) NULL,
285 -- /* i16 BIGINT(1) NULL,
286 -- /* r11 REAL(2,1) NULL,
287 -- /* r12 DOUBLE(2,1) NULL,
288 -- /* r13 DOUBLE PRECISION(2,1) NULL,
289 -- /* r14 FLOAT(1) NULL,
290 -- /* r15 FLOAT(2,1) NULL,
291 -- /* n11 DECIMAL(1) NULL,
292 -- /* n12 DECIMAL(2,1) NULL,
293 -- /* n13 NUMERIC(2) NULL,
294 -- /* n14 NUMERIC(2,1) NULL,
295 -- /* d11 TIMESTAMP(2) NULL,
296 -- /* d12 YEAR(2) NULL
299 -- /*-- all data types, NULL DEFAULT
300 -- /*DROP TABLE IF EXISTS t06;
301 -- /*CREATE TABLE t06 (
302 -- /* i01 TINYINT NULL DEFAULT 0,
303 -- /* i02 SMALLINT NULL DEFAULT 0,
304 -- /* i03 MEDIUMINT NULL DEFAULT 0,
305 -- /* i04 INT NULL DEFAULT 0,
306 -- /* i05 INTEGER NULL DEFAULT 0,
307 -- /* i06 BIGINT NULL DEFAULT 0,
308 -- /* r01 REAL NULL DEFAULT 0,
309 -- /* r02 DOUBLE NULL DEFAULT 0,
310 -- /* r03 DOUBLE PRECISION NULL DEFAULT 0,
311 -- /* r04 FLOAT NULL DEFAULT 0,
312 -- /* n01 DECIMAL NULL DEFAULT 0,
313 -- /* n02 NUMERIC NULL DEFAULT 0,
314 -- /* c01 CHAR(10) NULL DEFAULT '',
315 -- /* c02 VARCHAR(10) NULL DEFAULT '',
316 -- /* c03 CHAR(10) BINARY NULL DEFAULT '',
317 -- /* c04 VARCHAR(10) BINARY NULL DEFAULT '',
318 -- /*-- c05 NATIONAL CHAR(10) NULL DEFAULT '',
319 -- /*-- c06 NATIONAL VARCHAR(10) NULL DEFAULT '',
320 -- /*-- c07 NATIONAL CHAR(10) BINARY NULL DEFAULT '',
321 -- /*-- c08 NATIONAL VARCHAR(10) BINARY NULL DEFAULT '',
322 -- /* d01 DATE NULL DEFAULT 0,
323 -- /* d02 TIME NULL DEFAULT 0,
324 -- /* d03 TIMESTAMP NULL DEFAULT 0,
325 -- /* d04 DATETIME NULL DEFAULT 0,
326 -- /* d05 YEAR NULL DEFAULT 0,
327 -- /* b01 TINYBLOB NULL DEFAULT '',
328 -- /* b02 BLOB NULL DEFAULT '',
329 -- /* b03 MEDIUMBLOB NULL DEFAULT '',
330 -- /* b04 LONGBLOB NULL DEFAULT '',
331 -- /* t01 TINYTEXT NULL DEFAULT '',
332 -- /* t02 TEXT NULL DEFAULT '',
333 -- /* t03 MEDIUMTEXT NULL DEFAULT '',
334 -- /* t04 LONGTEXT NULL DEFAULT '',
336 -- /* e01 ENUM('value1','value2') NULL DEFAULT 'value1',
337 -- /*-- s01 SET('value1','value2'), -- supported
339 -- /* i11 TINYINT(1) NULL DEFAULT 0,
340 -- /* i12 SMALLINT(1) NULL DEFAULT 0,
341 -- /* i13 MEDIUMINT(1) NULL DEFAULT 0,
342 -- /* i14 INT(1) NULL DEFAULT 0,
343 -- /* i15 INTEGER(1) NULL DEFAULT 0,
344 -- /* i16 BIGINT(1) NULL DEFAULT 0,
345 -- /* r11 REAL(2,1) NULL DEFAULT 0,
346 -- /* r12 DOUBLE(2,1) NULL DEFAULT 0,
347 -- /* r13 DOUBLE PRECISION(2,1) NULL DEFAULT 0,
348 -- /* r14 FLOAT(1) NULL DEFAULT 0,
349 -- /* r15 FLOAT(2,1) NULL DEFAULT 0,
350 -- /* n11 DECIMAL(1) NULL DEFAULT 0,
351 -- /* n12 DECIMAL(2,1) NULL DEFAULT 0,
352 -- /* n13 NUMERIC(2) NULL DEFAULT 0,
353 -- /* n14 NUMERIC(2,1) NULL DEFAULT 0,
354 -- /* d11 TIMESTAMP(2) NULL DEFAULT 0,
355 -- /* d12 YEAR(2) NULL DEFAULT 0
359 -- all data types, UNSIGNED
360 DROP TABLE IF EXISTS t11;
362 i01 TINYINT UNSIGNED NOT NULL DEFAULT 0,
363 i02 SMALLINT UNSIGNED NOT NULL DEFAULT 0,
364 i03 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0,
365 i04 INT UNSIGNED NOT NULL DEFAULT 0,
366 i05 INTEGER UNSIGNED NOT NULL DEFAULT 0,
367 i06 BIGINT UNSIGNED NOT NULL DEFAULT 0,
368 r01 REAL UNSIGNED NOT NULL DEFAULT 0,
369 r02 DOUBLE UNSIGNED NOT NULL DEFAULT 0,
370 r03 DOUBLE PRECISION UNSIGNED NOT NULL DEFAULT 0,
371 r04 FLOAT UNSIGNED NOT NULL DEFAULT 0,
372 n01 DECIMAL UNSIGNED NOT NULL DEFAULT 0,
373 n02 NUMERIC UNSIGNED NOT NULL DEFAULT 0,
375 i11 TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
376 i12 SMALLINT(1) UNSIGNED NOT NULL DEFAULT 0,
377 i13 MEDIUMINT(1) UNSIGNED NOT NULL DEFAULT 0,
378 i14 INT(1) UNSIGNED NOT NULL DEFAULT 0,
379 i15 INTEGER(1) UNSIGNED NOT NULL DEFAULT 0,
380 i16 BIGINT(1) UNSIGNED NOT NULL DEFAULT 0,
381 r11 REAL(2,1) UNSIGNED NOT NULL DEFAULT 0,
382 r12 DOUBLE(2,1) UNSIGNED NOT NULL DEFAULT 0,
383 r13 DOUBLE PRECISION(2,1) UNSIGNED NOT NULL DEFAULT 0,
384 r14 FLOAT(1) UNSIGNED NOT NULL DEFAULT 0,
385 r15 FLOAT(2,1) UNSIGNED NOT NULL DEFAULT 0,
386 n11 DECIMAL(1) UNSIGNED NOT NULL DEFAULT 0,
387 n12 DECIMAL(2,1) UNSIGNED NOT NULL DEFAULT 0,
388 n13 NUMERIC(2) UNSIGNED NOT NULL DEFAULT 0,
389 n14 NUMERIC(2,1) UNSIGNED NOT NULL DEFAULT 0
392 -- all data types, ZEROFILL
393 DROP TABLE IF EXISTS t12;
395 i01 TINYINT ZEROFILL NOT NULL DEFAULT 0,
396 i02 SMALLINT ZEROFILL NOT NULL DEFAULT 0,
397 i03 MEDIUMINT ZEROFILL NOT NULL DEFAULT 0,
398 i04 INT ZEROFILL NOT NULL DEFAULT 0,
399 i05 INTEGER ZEROFILL NOT NULL DEFAULT 0,
400 i06 BIGINT ZEROFILL NOT NULL DEFAULT 0,
401 r01 REAL ZEROFILL NOT NULL DEFAULT 0,
402 r02 DOUBLE ZEROFILL NOT NULL DEFAULT 0,
403 r03 DOUBLE PRECISION ZEROFILL NOT NULL DEFAULT 0,
404 r04 FLOAT ZEROFILL NOT NULL DEFAULT 0,
405 n01 DECIMAL ZEROFILL NOT NULL DEFAULT 0,
406 n02 NUMERIC ZEROFILL NOT NULL DEFAULT 0,
408 i11 TINYINT(1) ZEROFILL NOT NULL DEFAULT 0,
409 i12 SMALLINT(1) ZEROFILL NOT NULL DEFAULT 0,
410 i13 MEDIUMINT(1) ZEROFILL NOT NULL DEFAULT 0,
411 i14 INT(1) ZEROFILL NOT NULL DEFAULT 0,
412 i15 INTEGER(1) ZEROFILL NOT NULL DEFAULT 0,
413 i16 BIGINT(1) ZEROFILL NOT NULL DEFAULT 0,
414 r11 REAL(2,1) ZEROFILL NOT NULL DEFAULT 0,
415 r12 DOUBLE(2,1) ZEROFILL NOT NULL DEFAULT 0,
416 r13 DOUBLE PRECISION(2,1) ZEROFILL NOT NULL DEFAULT 0,
417 r14 FLOAT(1) ZEROFILL NOT NULL DEFAULT 0,
418 r15 FLOAT(2,1) ZEROFILL NOT NULL DEFAULT 0,
419 n11 DECIMAL(1) ZEROFILL NOT NULL DEFAULT 0,
420 n12 DECIMAL(2,1) ZEROFILL NOT NULL DEFAULT 0,
421 n13 NUMERIC(2,1) ZEROFILL NOT NULL DEFAULT 0,
422 n14 NUMERIC(2,1) ZEROFILL NOT NULL DEFAULT 0
425 -- all data types, UNSIGNED ZEROFILL
426 DROP TABLE IF EXISTS t13;
428 i01 TINYINT UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
429 i02 SMALLINT UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
430 i03 MEDIUMINT UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
431 i04 INT UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
432 i05 INTEGER UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
433 i06 BIGINT UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
434 r01 REAL UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
435 r02 DOUBLE UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
436 r03 DOUBLE PRECISION UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
437 r04 FLOAT UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
438 n01 DECIMAL UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
439 n02 NUMERIC UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
441 i11 TINYINT(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
442 i12 SMALLINT(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
443 i13 MEDIUMINT(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
444 i14 INT(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
445 i15 INTEGER(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
446 i16 BIGINT(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
447 r11 REAL(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
448 r12 DOUBLE(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
449 r13 DOUBLE PRECISION(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
450 r14 FLOAT(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
451 r15 FLOAT(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
452 n11 DECIMAL(1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
453 n12 DECIMAL(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
454 n13 NUMERIC(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0,
455 n14 NUMERIC(2,1) UNSIGNED ZEROFILL NOT NULL DEFAULT 0
459 DROP TABLE IF EXISTS t21;
461 c01 CHAR(10) NOT NULL,
462 c02 VARCHAR(10) NOT NULL,
470 UNIQUE INDEX k07 (c01),
471 UNIQUE INDEX k08 (c01(1)),
473 FULLTEXT INDEX k10 (c01),
476 KEY k12 (c01(1), c02),
477 INDEX k13 (c01, c02),
478 INDEX k14 (c01(1), c02),
479 UNIQUE k15 (c01, c02),
480 UNIQUE k16 (c01(1), c02),
481 UNIQUE INDEX k17 (c01, c02),
482 UNIQUE INDEX k18 (c01(1), c02),
483 FULLTEXT k19 (c01, c02),
484 FULLTEXT INDEX k20 (c01, c02),
489 -- multi-field primary key
490 DROP TABLE IF EXISTS t22;
492 c01 VARCHAR(10) NOT NULL,
493 c02 VARCHAR(10) NOT NULL,
494 PRIMARY KEY (c01, c02)
497 -- multi-field primary key with length
498 DROP TABLE IF EXISTS t23;
500 c01 VARCHAR(255) NOT NULL,
501 c02 VARCHAR(255) NOT NULL,
502 PRIMARY KEY (c01(10), c02(10))
505 -- primary key 2nd syntax
506 DROP TABLE IF EXISTS t24;
508 c01 VARCHAR(255) NOT NULL PRIMARY KEY,
509 c02 VARCHAR(255) NOT NULL
512 -- all data types, AUTO_INCREMENT
513 DROP TABLE IF EXISTS k01;
515 i01 TINYINT UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
518 DROP TABLE IF EXISTS k02;
520 i02 SMALLINT UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
523 DROP TABLE IF EXISTS k03;
525 i03 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
528 DROP TABLE IF EXISTS k04;
530 i04 INT UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
533 DROP TABLE IF EXISTS k05;
535 i05 INTEGER UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
538 DROP TABLE IF EXISTS k06;
540 i06 BIGINT UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
543 DROP TABLE IF EXISTS k11;
545 i11 TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
548 DROP TABLE IF EXISTS k12;
550 i12 SMALLINT(1) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
553 DROP TABLE IF EXISTS k13;
555 i13 MEDIUMINT(1) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
558 DROP TABLE IF EXISTS k14;
560 i14 INT(1) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
563 DROP TABLE IF EXISTS k15;
565 i15 INTEGER(1) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY
568 DROP TABLE IF EXISTS k16;
570 i16 BIGINT(1) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT PRIMARY KEY