如何在char中保留空格?我创建了 2 个表,
create table test_1 (a int, b char(10)) ;
create table test_2 (a int, b varchar(255));
并在 test_1 中插入一行
insert into test_1 values (1 ,' ');
insert into test_2 select * from test_1;
select a, length(b) from test_2;
它返回
| a | length(b) |
| -------- | -------------- |
| 1 | 0 |
我希望像甲骨文一样爆炸
| a | length(b) |
| -------- | -------------- |
| 1 | 10 |
有什么选择可以尝试吗?