ctype_mb.result
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:2k
- drop table if exists t1;
- CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2;
- SHOW CREATE TABLE t1;
- Table Create Table
- t1 CREATE TABLE `t1` (
- `c1` char(4) character set utf8 NOT NULL default '',
- `c2` char(4) character set utf8 NOT NULL default ''
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- DELETE FROM t1;
- ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8;
- SHOW CREATE TABLE t1;
- Table Create Table
- t1 CREATE TABLE `t1` (
- `c1` char(4) character set utf8 NOT NULL default '',
- `c2` char(4) character set utf8 NOT NULL default '',
- `c3` char(4) character set utf8 default NULL
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
- Warnings:
- Warning 1265 Data truncated for column 'c1' at row 1
- Warning 1265 Data truncated for column 'c2' at row 1
- Warning 1265 Data truncated for column 'c3' at row 1
- SELECT * FROM t1;
- c1 c2 c3
- aaaa aaaa aaaa
- DROP TABLE t1;
- CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8, KEY key_a(a(3)));
- SHOW CREATE TABLE t1;
- Table Create Table
- t1 CREATE TABLE `t1` (
- `a` char(4) character set utf8 default NULL,
- KEY `key_a` (`a`(3))
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- SHOW KEYS FROM t1;
- Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
- t1 1 key_a 1 a A NULL 3 NULL YES BTREE
- ALTER TABLE t1 CHANGE a a CHAR(4);
- SHOW CREATE TABLE t1;
- Table Create Table
- t1 CREATE TABLE `t1` (
- `a` char(4) default NULL,
- KEY `key_a` (`a`(3))
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- SHOW KEYS FROM t1;
- Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
- t1 1 key_a 1 a A NULL 3 NULL YES BTREE
- ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;
- SHOW CREATE TABLE t1;
- Table Create Table
- t1 CREATE TABLE `t1` (
- `a` char(4) character set utf8 default NULL,
- KEY `key_a` (`a`(3))
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- SHOW KEYS FROM t1;
- Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
- t1 1 key_a 1 a A NULL 3 NULL YES BTREE
- DROP TABLE t1;