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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
DROP TABLE IF EXISTS t1;
SET NAMES cp932;
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT ' ', c2 INTEGER,c3 INTEGER COMMENT '', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1),INDEX i2(c2)
) COMMENT='';
Warnings:
Warning 1629 Comment for field 'c3' is too long (max = 765)
Warning 1628 Comment for table 't1' is too long (max = 180)
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
60
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
column_comment char_length(column_comment)
11
0
255
0
0
0
0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL COMMENT ' ',
`c2` int(11) DEFAULT NULL,
`c3` int(11) DEFAULT NULL COMMENT '',
`c4` int(11) DEFAULT NULL,
`c5` int(11) DEFAULT NULL,
`c6` int(11) DEFAULT NULL,
`c7` int(11) DEFAULT NULL,
KEY `i1` (`c1`),
KEY `i2` (`c2`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT=''
drop table t1;
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1), INDEX i2(c2)
) COMMENT='';
Warnings:
Warning 1629 Comment for field 'c3' is too long (max = 765)
Warning 1628 Comment for table 't1' is too long (max = 180)
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
60
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
column_comment char_length(column_comment)
c1 comment 10
0
255
0
0
0
0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL COMMENT 'c1 comment',
`c2` int(11) DEFAULT NULL,
`c3` int(11) DEFAULT NULL COMMENT '',
`c4` int(11) DEFAULT NULL,
`c5` int(11) DEFAULT NULL,
`c6` int(11) DEFAULT NULL,
`c7` int(11) DEFAULT NULL,
KEY `i1` (`c1`),
KEY `i2` (`c2`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT=''
drop table t1;
set sql_mode='';
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1), INDEX i2(c2)
) COMMENT='';
Warnings:
Warning 1629 Comment for field 'c3' is too long (max = 765)
Warning 1628 Comment for table 't1' is too long (max = 180)
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
60
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
column_comment char_length(column_comment)
c1 comment 10
0
255
0
0
0
0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL COMMENT 'c1 comment',
`c2` int(11) DEFAULT NULL,
`c3` int(11) DEFAULT NULL COMMENT '',
`c4` int(11) DEFAULT NULL,
`c5` int(11) DEFAULT NULL,
`c6` int(11) DEFAULT NULL,
`c7` int(11) DEFAULT NULL,
KEY `i1` (`c1`),
KEY `i2` (`c2`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT=''
drop table t1;
set sql_mode='';
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1), INDEX i2(c2)
) COMMENT='';
Warnings:
Warning 1629 Comment for field 'c3' is too long (max = 765)
Warning 1628 Comment for table 't1' is too long (max = 180)
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
60
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
column_comment char_length(column_comment)
c1 comment 10
0
255
0
0
0
0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL COMMENT 'c1 comment',
`c2` int(11) DEFAULT NULL,
`c3` int(11) DEFAULT NULL COMMENT '',
`c4` int(11) DEFAULT NULL,
`c5` int(11) DEFAULT NULL,
`c6` int(11) DEFAULT NULL,
`c7` int(11) DEFAULT NULL,
KEY `i1` (`c1`),
KEY `i2` (`c2`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT=''
drop table t1;
set sql_mode='TRADITIONAL';
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1),INDEX i2(c2)
) COMMENT='';
ERROR HY000: Comment for field 'c3' is too long (max = 765)
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
column_comment char_length(column_comment)
|