Home  >  Article  >  Database  >  Oracle varchar2最大支持长度

Oracle varchar2最大支持长度

WBOY
WBOYOriginal
2016-06-07 17:12:141877browse

经常有人问oracle varchar2最大支持长度为多少?其实这个叫法不太准确,varchar2分别在oracle的sql和pl/sql中都有使用,oracle 在

dw@dw>drop table idb_varchar2; 表已删除。 dw@dw>create table idb_varchar2 2 (id number, 3 name varchar2(4000 char)); 表已创建。 dw@dw>insert into idb_varchar2 values(1,lpad('中',32767,'中')); 已创建 1 行。 dw@dw>insert into idb_varchar2 values(2,lpad('a',32767,'b')); 已创建 1 行。 dw@dw>commit; 提交完成。 dw@dw>select id,lengthb(name),length(name) from idb_varchar2; ID LENGTHB(NAME) LENGTH(NAME) ---------- ------------- ------------ 1 4000 2000 2 4000 4000 已选择2行。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn