drop table if exists tb;create table tb(c char(10), vc varchar(10));
insert into tb select 'ab','vc';
select tb.*, length(tb.c) c_len, length(vc) vc_len from tb;
-- result
-- ab, vc, 2, 2
为什么 ab字段的长度不是10呢,而是2呢,char不是定长的吗应该占据10个字符串的位置吗?