Oracle データベースに漢字を挿入したい。
select length('有个可爱的小娃在旁边') from dual;
10
drop table multibyte;
create table multibyte (name varchar2(10));
insert into multibyte
values('有个可爱的小娃在旁边');
というエラーメッセージが表示されます
An attempt was made to insert or update a column with a value
which is too wide for the width of the destination column.
The name of the column is given, along with the actual width
of the value, and the maximum allowed width of the column.
Note that widths are reported in characters if character length
semantics are in effect for the column, otherwise widths are
reported in bytes
列幅を大きくすると、問題が解消されることを私は知っています。私の質問は、長さ関数が幅が10であることを教えてくれるとき、なぜそれを varchar2(10) の列に挿入できないのですか?