- 论坛徽章:
- 0
|
C:\Documents and Settings\Administrator>mysql wap
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 32 to server version: 5.0.18-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> insert into catalog (name,pagesize) values("彩信资源",4);
ERROR 1406 (22001): Data too long for column 'name' at row 1
mysql> show variables like '%char%';
+--------------------------+----------------------------------------------------
----+
| Variable_name | Value
|
+--------------------------+----------------------------------------------------
----+
| character_set_client | utf8
|
| character_set_connection | utf8
|
| character_set_database | utf8
|
| character_set_results | utf8
|
| character_set_server | utf8
|
| character_set_system | utf8
|
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.0 hare\charse
ts\ |
+--------------------------+----------------------------------------------------
----+
7 rows in set (0.00 sec)
mysql> show create table catalog;
+---------+---------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------+
| Table | Create Table
|
+---------+---------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------+
| catalog | CREATE TABLE `catalog` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`parentID` int(11) default NULL,
`pageSize` int(3) default '4',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 |
+---------+---------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------+
1 row in set (0.00 sec)
mysql>
`name` varchar(255)了,还不够长?疑惑ing |
|