VARCHAR2 (20) How many numbers can be stored

Excerpt: https:? //Wenda.so.com/q/1513900100217695 src = 170 & q = varchar2% 281% 29% E5% A4% 9A% E5% A4% A7

varchar2 oracle is in a unique type, you can store 0-20 digits (written in English), if the Chinese digital words can only store 10.

Create a test table:

create table test
(id int,
name varchar2(20));

Execution sentence, here is the 21 numbers:

insert into test values (1,'123456789012345678901');

Test Chinese figures:

insert into test values ​​(1, '123456789 11');

The result is identical:

So, varchar2 (20) can store 20 numbers, or ten Chinese.

 


This section is taken from: https: //www.cnblogs.com/Grand-Jon/p/7389427.html

A, Oracle is varchar2 type

  1. Our character data stored in an Oracle database is generally used VARCHAR2. VARCHAR2 both points PL / SQL Data Types of variable type, Oracle Database field type can be divided in different scenarios of different maximum length.

  2. In the Oracle Database, VARCHAR2 field type, a maximum value of 4000; PL / SQL variables in VARCHAR2 type, the maximum length of 32767 bytes.

  3. When VARCHAR2 to fit the information we need to store, came out of Oracle Big Data type LOB (Large Object, large objects).


 

Two, Oarcle type of LOB

  1. In Oracle, LOB (Large Object, large object) type of field is now used more and more. Since this type of field capacity (up to 4GB of receiving data), and a table can have multiple fields of this type, very flexible, a very large volume of data applied to a business (e.g., images, archives Wait).

  2. BLOB and CLOB LOB types are divided into two kinds: BLOB i.e. Binary Large Object (Binary Large Object), adapted for storing non-text byte stream data (such as program, image, video, etc.).

  3. The CLOB, namely Character Large Object (Character Large Object), are associated with the character set, suitable for storing text data type (such as historical archives, voluminous writings, etc.).

 

Guess you like

Origin www.cnblogs.com/zzw3014/p/11858741.html