answersLogoWhite

0

Character string values storage:

1. CHAR:

§ Stores strings of fixed length.

§ The length parameter s specifies the length of the strings.

§ If the string has smaller length it padded with space at the end

§ It will waste of a lot of disk space.

§ If the string has bigger length it truncated to the scale number of the string.

2. VARCHAR:

§ Stores strings of variable length.

§ The length parameter specifies the maximum length of the strings

§ It stores up to 2000 bytes of characters

§ It will occupy space for NULL values

§ The total length for strings is defined when database was created.

3. VARCHAR(2):

§ Stores strings of variable length.

§ The length parameter specifies the maximum length of the strings

§ It stores up to 4000 bytes of characters

§ It will not occupy space for NULL values

§ The total length of strings is defined when strings are given

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Different between oracle datatypes char20 and varchar20?

In Oracle, the char(20) datatype is a fixed length character string. It will always use 20 characters in the block. If the value contained in the field is less than 20 characters, it will be padded on the right (or the left, depending on coding) with spaces. In Oracle, the varchar(20) datatype is a variable length character string. It will use betwen 1 and 21 characters in the block, 1 for the length, and 0-20 for the data. Its effective length can range between 0 and 20 characters. Note, however, that a string of length 0 is indistinguishable from a null value. This is a deviation from the SQL standard that Oracle acknowledges, but fixing it would break too much existing code. Note also that comparing a char against a varchar is problematic. With the trailiing spaces, the char is not the same as a varchar containing the same characters. Predicates involving these mixed types should use the rtrim expression on the char datatype. (Example: while rtrim(mycharvalue) = myvarcharvalue) Note also that varchar is obsolete. Current code should use varchar2, such as varchar2(20).


Explain the difference betwwen the two types of feeding?

explain the difference between the two types of feeding?


What are the Other database types instead of oracle?

MsSqlServer


What is the difference between the different types of emulsifying agents?

lecithin


Difference between different types of operating system?

fgfghgh


Difference between types of displacement addressing modes?

wewe


In English Difference between various and different?

There's no signifigant difference between the two, each is used in certain contexts. "There are dozens of different dog types", versus, "there are various dog types."


Difference between the various types of fiber optic cables?

Nothing


What is the difference between a tragedy in itself and a tragedy of itself?

what is the tragedy and what is types of tragedy what is the tragedy and what is types of tragedy


What are different types of search engines?

Identify 5 types of search engines and explain the difference between


What are the different types of databases available?

sql db2 oracle mysql


What are 5 different types of databases?

sql db2 oracle mysql