Debian Codegraph @

mysql-test/suite/engines/funcs/r/ta_drop_column.result

raw
1 DROP TABLE IF EXISTS t1;
2 CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT);
3 SHOW TABLES;
4 Tables_in_test
5 t1
6 SHOW CREATE TABLE t1;
7 Table Create Table
8 t1 CREATE TABLE `t1` (
9 `c1` bit(1) NOT NULL,
10 `c2` bit(1) DEFAULT NULL
11 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
12 ALTER TABLE t1 DROP c2;
13 ALTER TABLE t1 DROP c1;
14 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
15 SHOW CREATE TABLE t1;
16 Table Create Table
17 t1 CREATE TABLE `t1` (
18 `c1` bit(1) NOT NULL
19 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
20 DROP TABLE t1;
21 SHOW TABLES;
22 Tables_in_test
23 CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT);
24 SHOW TABLES;
25 Tables_in_test
26 t1
27 SHOW CREATE TABLE t1;
28 Table Create Table
29 t1 CREATE TABLE `t1` (
30 `c1` tinyint(4) NOT NULL,
31 `c2` tinyint(4) DEFAULT NULL
32 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
33 ALTER TABLE t1 DROP c2;
34 ALTER TABLE t1 DROP c1;
35 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
36 SHOW CREATE TABLE t1;
37 Table Create Table
38 t1 CREATE TABLE `t1` (
39 `c1` tinyint(4) NOT NULL
40 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
41 DROP TABLE t1;
42 SHOW TABLES;
43 Tables_in_test
44 CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT);
45 SHOW TABLES;
46 Tables_in_test
47 t1
48 SHOW CREATE TABLE t1;
49 Table Create Table
50 t1 CREATE TABLE `t1` (
51 `c1` smallint(6) NOT NULL,
52 `c2` smallint(6) DEFAULT NULL
53 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
54 ALTER TABLE t1 DROP c2;
55 ALTER TABLE t1 DROP c1;
56 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
57 SHOW CREATE TABLE t1;
58 Table Create Table
59 t1 CREATE TABLE `t1` (
60 `c1` smallint(6) NOT NULL
61 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
62 DROP TABLE t1;
63 SHOW TABLES;
64 Tables_in_test
65 CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT);
66 SHOW TABLES;
67 Tables_in_test
68 t1
69 SHOW CREATE TABLE t1;
70 Table Create Table
71 t1 CREATE TABLE `t1` (
72 `c1` mediumint(9) NOT NULL,
73 `c2` mediumint(9) DEFAULT NULL
74 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
75 ALTER TABLE t1 DROP c2;
76 ALTER TABLE t1 DROP c1;
77 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
78 SHOW CREATE TABLE t1;
79 Table Create Table
80 t1 CREATE TABLE `t1` (
81 `c1` mediumint(9) NOT NULL
82 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
83 DROP TABLE t1;
84 SHOW TABLES;
85 Tables_in_test
86 CREATE TABLE t1(c1 INT NOT NULL, c2 INT);
87 SHOW TABLES;
88 Tables_in_test
89 t1
90 SHOW CREATE TABLE t1;
91 Table Create Table
92 t1 CREATE TABLE `t1` (
93 `c1` int(11) NOT NULL,
94 `c2` int(11) DEFAULT NULL
95 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
96 ALTER TABLE t1 DROP c2;
97 ALTER TABLE t1 DROP c1;
98 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
99 SHOW CREATE TABLE t1;
100 Table Create Table
101 t1 CREATE TABLE `t1` (
102 `c1` int(11) NOT NULL
103 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
104 DROP TABLE t1;
105 SHOW TABLES;
106 Tables_in_test
107 CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER);
108 SHOW TABLES;
109 Tables_in_test
110 t1
111 SHOW CREATE TABLE t1;
112 Table Create Table
113 t1 CREATE TABLE `t1` (
114 `c1` int(11) NOT NULL,
115 `c2` int(11) DEFAULT NULL
116 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
117 ALTER TABLE t1 DROP c2;
118 ALTER TABLE t1 DROP c1;
119 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
120 SHOW CREATE TABLE t1;
121 Table Create Table
122 t1 CREATE TABLE `t1` (
123 `c1` int(11) NOT NULL
124 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
125 DROP TABLE t1;
126 SHOW TABLES;
127 Tables_in_test
128 CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT);
129 SHOW TABLES;
130 Tables_in_test
131 t1
132 SHOW CREATE TABLE t1;
133 Table Create Table
134 t1 CREATE TABLE `t1` (
135 `c1` bigint(20) NOT NULL,
136 `c2` bigint(20) DEFAULT NULL
137 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
138 ALTER TABLE t1 DROP c2;
139 ALTER TABLE t1 DROP c1;
140 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
141 SHOW CREATE TABLE t1;
142 Table Create Table
143 t1 CREATE TABLE `t1` (
144 `c1` bigint(20) NOT NULL
145 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
146 DROP TABLE t1;
147 SHOW TABLES;
148 Tables_in_test
149 CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL);
150 SHOW TABLES;
151 Tables_in_test
152 t1
153 SHOW CREATE TABLE t1;
154 Table Create Table
155 t1 CREATE TABLE `t1` (
156 `c1` double NOT NULL,
157 `c2` double DEFAULT NULL
158 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
159 ALTER TABLE t1 DROP c2;
160 ALTER TABLE t1 DROP c1;
161 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
162 SHOW CREATE TABLE t1;
163 Table Create Table
164 t1 CREATE TABLE `t1` (
165 `c1` double NOT NULL
166 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
167 DROP TABLE t1;
168 SHOW TABLES;
169 Tables_in_test
170 CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE);
171 SHOW TABLES;
172 Tables_in_test
173 t1
174 SHOW CREATE TABLE t1;
175 Table Create Table
176 t1 CREATE TABLE `t1` (
177 `c1` double NOT NULL,
178 `c2` double DEFAULT NULL
179 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
180 ALTER TABLE t1 DROP c2;
181 ALTER TABLE t1 DROP c1;
182 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
183 SHOW CREATE TABLE t1;
184 Table Create Table
185 t1 CREATE TABLE `t1` (
186 `c1` double NOT NULL
187 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
188 DROP TABLE t1;
189 SHOW TABLES;
190 Tables_in_test
191 CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT);
192 SHOW TABLES;
193 Tables_in_test
194 t1
195 SHOW CREATE TABLE t1;
196 Table Create Table
197 t1 CREATE TABLE `t1` (
198 `c1` float NOT NULL,
199 `c2` float DEFAULT NULL
200 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
201 ALTER TABLE t1 DROP c2;
202 ALTER TABLE t1 DROP c1;
203 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
204 SHOW CREATE TABLE t1;
205 Table Create Table
206 t1 CREATE TABLE `t1` (
207 `c1` float NOT NULL
208 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
209 DROP TABLE t1;
210 SHOW TABLES;
211 Tables_in_test
212 CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL);
213 SHOW TABLES;
214 Tables_in_test
215 t1
216 SHOW CREATE TABLE t1;
217 Table Create Table
218 t1 CREATE TABLE `t1` (
219 `c1` decimal(10,0) NOT NULL,
220 `c2` decimal(10,0) DEFAULT NULL
221 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
222 ALTER TABLE t1 DROP c2;
223 ALTER TABLE t1 DROP c1;
224 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
225 SHOW CREATE TABLE t1;
226 Table Create Table
227 t1 CREATE TABLE `t1` (
228 `c1` decimal(10,0) NOT NULL
229 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
230 DROP TABLE t1;
231 SHOW TABLES;
232 Tables_in_test
233 CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC);
234 SHOW TABLES;
235 Tables_in_test
236 t1
237 SHOW CREATE TABLE t1;
238 Table Create Table
239 t1 CREATE TABLE `t1` (
240 `c1` decimal(10,0) NOT NULL,
241 `c2` decimal(10,0) DEFAULT NULL
242 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
243 ALTER TABLE t1 DROP c2;
244 ALTER TABLE t1 DROP c1;
245 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
246 SHOW CREATE TABLE t1;
247 Table Create Table
248 t1 CREATE TABLE `t1` (
249 `c1` decimal(10,0) NOT NULL
250 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
251 DROP TABLE t1;
252 SHOW TABLES;
253 Tables_in_test
254 CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE);
255 SHOW TABLES;
256 Tables_in_test
257 t1
258 SHOW CREATE TABLE t1;
259 Table Create Table
260 t1 CREATE TABLE `t1` (
261 `c1` date NOT NULL,
262 `c2` date DEFAULT NULL
263 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
264 ALTER TABLE t1 DROP c2;
265 ALTER TABLE t1 DROP c1;
266 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
267 SHOW CREATE TABLE t1;
268 Table Create Table
269 t1 CREATE TABLE `t1` (
270 `c1` date NOT NULL
271 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
272 DROP TABLE t1;
273 SHOW TABLES;
274 Tables_in_test
275 CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME);
276 SHOW TABLES;
277 Tables_in_test
278 t1
279 SHOW CREATE TABLE t1;
280 Table Create Table
281 t1 CREATE TABLE `t1` (
282 `c1` time NOT NULL,
283 `c2` time DEFAULT NULL
284 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
285 ALTER TABLE t1 DROP c2;
286 ALTER TABLE t1 DROP c1;
287 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
288 SHOW CREATE TABLE t1;
289 Table Create Table
290 t1 CREATE TABLE `t1` (
291 `c1` time NOT NULL
292 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
293 DROP TABLE t1;
294 SHOW TABLES;
295 Tables_in_test
296 CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP);
297 SHOW TABLES;
298 Tables_in_test
299 t1
300 SHOW CREATE TABLE t1;
301 Table Create Table
302 t1 CREATE TABLE `t1` (
303 `c1` timestamp NOT NULL,
304 `c2` timestamp NULL DEFAULT NULL
305 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
306 ALTER TABLE t1 DROP c2;
307 ALTER TABLE t1 DROP c1;
308 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
309 SHOW CREATE TABLE t1;
310 Table Create Table
311 t1 CREATE TABLE `t1` (
312 `c1` timestamp NOT NULL
313 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
314 DROP TABLE t1;
315 SHOW TABLES;
316 Tables_in_test
317 CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR);
318 SHOW TABLES;
319 Tables_in_test
320 t1
321 SHOW CREATE TABLE t1;
322 Table Create Table
323 t1 CREATE TABLE `t1` (
324 `c1` year(4) NOT NULL,
325 `c2` year(4) DEFAULT NULL
326 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
327 ALTER TABLE t1 DROP c2;
328 ALTER TABLE t1 DROP c1;
329 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
330 SHOW CREATE TABLE t1;
331 Table Create Table
332 t1 CREATE TABLE `t1` (
333 `c1` year(4) NOT NULL
334 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
335 DROP TABLE t1;
336 SHOW TABLES;
337 Tables_in_test
338 CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT);
339 SHOW TABLES;
340 Tables_in_test
341 t1
342 SHOW CREATE TABLE t1;
343 Table Create Table
344 t1 CREATE TABLE `t1` (
345 `c1` bit(1) NOT NULL,
346 `c2` bit(1) DEFAULT NULL
347 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
348 ALTER TABLE t1 DROP COLUMN c2;
349 ALTER TABLE t1 DROP COLUMN c1;
350 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
351 SHOW CREATE TABLE t1;
352 Table Create Table
353 t1 CREATE TABLE `t1` (
354 `c1` bit(1) NOT NULL
355 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
356 DROP TABLE t1;
357 SHOW TABLES;
358 Tables_in_test
359 CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT);
360 SHOW TABLES;
361 Tables_in_test
362 t1
363 SHOW CREATE TABLE t1;
364 Table Create Table
365 t1 CREATE TABLE `t1` (
366 `c1` tinyint(4) NOT NULL,
367 `c2` tinyint(4) DEFAULT NULL
368 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
369 ALTER TABLE t1 DROP COLUMN c2;
370 ALTER TABLE t1 DROP COLUMN c1;
371 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
372 SHOW CREATE TABLE t1;
373 Table Create Table
374 t1 CREATE TABLE `t1` (
375 `c1` tinyint(4) NOT NULL
376 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
377 DROP TABLE t1;
378 SHOW TABLES;
379 Tables_in_test
380 CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT);
381 SHOW TABLES;
382 Tables_in_test
383 t1
384 SHOW CREATE TABLE t1;
385 Table Create Table
386 t1 CREATE TABLE `t1` (
387 `c1` smallint(6) NOT NULL,
388 `c2` smallint(6) DEFAULT NULL
389 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
390 ALTER TABLE t1 DROP COLUMN c2;
391 ALTER TABLE t1 DROP COLUMN c1;
392 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
393 SHOW CREATE TABLE t1;
394 Table Create Table
395 t1 CREATE TABLE `t1` (
396 `c1` smallint(6) NOT NULL
397 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
398 DROP TABLE t1;
399 SHOW TABLES;
400 Tables_in_test
401 CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT);
402 SHOW TABLES;
403 Tables_in_test
404 t1
405 SHOW CREATE TABLE t1;
406 Table Create Table
407 t1 CREATE TABLE `t1` (
408 `c1` mediumint(9) NOT NULL,
409 `c2` mediumint(9) DEFAULT NULL
410 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
411 ALTER TABLE t1 DROP COLUMN c2;
412 ALTER TABLE t1 DROP COLUMN c1;
413 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
414 SHOW CREATE TABLE t1;
415 Table Create Table
416 t1 CREATE TABLE `t1` (
417 `c1` mediumint(9) NOT NULL
418 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
419 DROP TABLE t1;
420 SHOW TABLES;
421 Tables_in_test
422 CREATE TABLE t1(c1 INT NOT NULL, c2 INT);
423 SHOW TABLES;
424 Tables_in_test
425 t1
426 SHOW CREATE TABLE t1;
427 Table Create Table
428 t1 CREATE TABLE `t1` (
429 `c1` int(11) NOT NULL,
430 `c2` int(11) DEFAULT NULL
431 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
432 ALTER TABLE t1 DROP COLUMN c2;
433 ALTER TABLE t1 DROP COLUMN c1;
434 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
435 SHOW CREATE TABLE t1;
436 Table Create Table
437 t1 CREATE TABLE `t1` (
438 `c1` int(11) NOT NULL
439 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
440 DROP TABLE t1;
441 SHOW TABLES;
442 Tables_in_test
443 CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER);
444 SHOW TABLES;
445 Tables_in_test
446 t1
447 SHOW CREATE TABLE t1;
448 Table Create Table
449 t1 CREATE TABLE `t1` (
450 `c1` int(11) NOT NULL,
451 `c2` int(11) DEFAULT NULL
452 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
453 ALTER TABLE t1 DROP COLUMN c2;
454 ALTER TABLE t1 DROP COLUMN c1;
455 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
456 SHOW CREATE TABLE t1;
457 Table Create Table
458 t1 CREATE TABLE `t1` (
459 `c1` int(11) NOT NULL
460 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
461 DROP TABLE t1;
462 SHOW TABLES;
463 Tables_in_test
464 CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT);
465 SHOW TABLES;
466 Tables_in_test
467 t1
468 SHOW CREATE TABLE t1;
469 Table Create Table
470 t1 CREATE TABLE `t1` (
471 `c1` bigint(20) NOT NULL,
472 `c2` bigint(20) DEFAULT NULL
473 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
474 ALTER TABLE t1 DROP COLUMN c2;
475 ALTER TABLE t1 DROP COLUMN c1;
476 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
477 SHOW CREATE TABLE t1;
478 Table Create Table
479 t1 CREATE TABLE `t1` (
480 `c1` bigint(20) NOT NULL
481 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
482 DROP TABLE t1;
483 SHOW TABLES;
484 Tables_in_test
485 CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL);
486 SHOW TABLES;
487 Tables_in_test
488 t1
489 SHOW CREATE TABLE t1;
490 Table Create Table
491 t1 CREATE TABLE `t1` (
492 `c1` double NOT NULL,
493 `c2` double DEFAULT NULL
494 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
495 ALTER TABLE t1 DROP COLUMN c2;
496 ALTER TABLE t1 DROP COLUMN c1;
497 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
498 SHOW CREATE TABLE t1;
499 Table Create Table
500 t1 CREATE TABLE `t1` (
501 `c1` double NOT NULL
502 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
503 DROP TABLE t1;
504 SHOW TABLES;
505 Tables_in_test
506 CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE);
507 SHOW TABLES;
508 Tables_in_test
509 t1
510 SHOW CREATE TABLE t1;
511 Table Create Table
512 t1 CREATE TABLE `t1` (
513 `c1` double NOT NULL,
514 `c2` double DEFAULT NULL
515 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
516 ALTER TABLE t1 DROP COLUMN c2;
517 ALTER TABLE t1 DROP COLUMN c1;
518 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
519 SHOW CREATE TABLE t1;
520 Table Create Table
521 t1 CREATE TABLE `t1` (
522 `c1` double NOT NULL
523 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
524 DROP TABLE t1;
525 SHOW TABLES;
526 Tables_in_test
527 CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT);
528 SHOW TABLES;
529 Tables_in_test
530 t1
531 SHOW CREATE TABLE t1;
532 Table Create Table
533 t1 CREATE TABLE `t1` (
534 `c1` float NOT NULL,
535 `c2` float DEFAULT NULL
536 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
537 ALTER TABLE t1 DROP COLUMN c2;
538 ALTER TABLE t1 DROP COLUMN c1;
539 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
540 SHOW CREATE TABLE t1;
541 Table Create Table
542 t1 CREATE TABLE `t1` (
543 `c1` float NOT NULL
544 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
545 DROP TABLE t1;
546 SHOW TABLES;
547 Tables_in_test
548 CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL);
549 SHOW TABLES;
550 Tables_in_test
551 t1
552 SHOW CREATE TABLE t1;
553 Table Create Table
554 t1 CREATE TABLE `t1` (
555 `c1` decimal(10,0) NOT NULL,
556 `c2` decimal(10,0) DEFAULT NULL
557 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
558 ALTER TABLE t1 DROP COLUMN c2;
559 ALTER TABLE t1 DROP COLUMN c1;
560 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
561 SHOW CREATE TABLE t1;
562 Table Create Table
563 t1 CREATE TABLE `t1` (
564 `c1` decimal(10,0) NOT NULL
565 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
566 DROP TABLE t1;
567 SHOW TABLES;
568 Tables_in_test
569 CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC);
570 SHOW TABLES;
571 Tables_in_test
572 t1
573 SHOW CREATE TABLE t1;
574 Table Create Table
575 t1 CREATE TABLE `t1` (
576 `c1` decimal(10,0) NOT NULL,
577 `c2` decimal(10,0) DEFAULT NULL
578 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
579 ALTER TABLE t1 DROP COLUMN c2;
580 ALTER TABLE t1 DROP COLUMN c1;
581 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
582 SHOW CREATE TABLE t1;
583 Table Create Table
584 t1 CREATE TABLE `t1` (
585 `c1` decimal(10,0) NOT NULL
586 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
587 DROP TABLE t1;
588 SHOW TABLES;
589 Tables_in_test
590 CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE);
591 SHOW TABLES;
592 Tables_in_test
593 t1
594 SHOW CREATE TABLE t1;
595 Table Create Table
596 t1 CREATE TABLE `t1` (
597 `c1` date NOT NULL,
598 `c2` date DEFAULT NULL
599 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
600 ALTER TABLE t1 DROP COLUMN c2;
601 ALTER TABLE t1 DROP COLUMN c1;
602 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
603 SHOW CREATE TABLE t1;
604 Table Create Table
605 t1 CREATE TABLE `t1` (
606 `c1` date NOT NULL
607 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
608 DROP TABLE t1;
609 SHOW TABLES;
610 Tables_in_test
611 CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME);
612 SHOW TABLES;
613 Tables_in_test
614 t1
615 SHOW CREATE TABLE t1;
616 Table Create Table
617 t1 CREATE TABLE `t1` (
618 `c1` time NOT NULL,
619 `c2` time DEFAULT NULL
620 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
621 ALTER TABLE t1 DROP COLUMN c2;
622 ALTER TABLE t1 DROP COLUMN c1;
623 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
624 SHOW CREATE TABLE t1;
625 Table Create Table
626 t1 CREATE TABLE `t1` (
627 `c1` time NOT NULL
628 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
629 DROP TABLE t1;
630 SHOW TABLES;
631 Tables_in_test
632 CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP);
633 SHOW TABLES;
634 Tables_in_test
635 t1
636 SHOW CREATE TABLE t1;
637 Table Create Table
638 t1 CREATE TABLE `t1` (
639 `c1` timestamp NOT NULL,
640 `c2` timestamp NULL DEFAULT NULL
641 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
642 ALTER TABLE t1 DROP COLUMN c2;
643 ALTER TABLE t1 DROP COLUMN c1;
644 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
645 SHOW CREATE TABLE t1;
646 Table Create Table
647 t1 CREATE TABLE `t1` (
648 `c1` timestamp NOT NULL
649 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
650 DROP TABLE t1;
651 SHOW TABLES;
652 Tables_in_test
653 CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR);
654 SHOW TABLES;
655 Tables_in_test
656 t1
657 SHOW CREATE TABLE t1;
658 Table Create Table
659 t1 CREATE TABLE `t1` (
660 `c1` year(4) NOT NULL,
661 `c2` year(4) DEFAULT NULL
662 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
663 ALTER TABLE t1 DROP COLUMN c2;
664 ALTER TABLE t1 DROP COLUMN c1;
665 ERROR 42000: You can't delete all columns with ALTER TABLE; use DROP TABLE instead
666 SHOW CREATE TABLE t1;
667 Table Create Table
668 t1 CREATE TABLE `t1` (
669 `c1` year(4) NOT NULL
670 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
671 DROP TABLE t1;
672 SHOW TABLES;
673 Tables_in_test