diff b/w varchar [message #10547] |
Thu, 29 January 2004 07:44 |
ashokmote
Messages: 56 Registered: December 2003
|
Member |
|
|
wat is the difference b/w char and varchar.
and also difference b/w varchar and varchar2.
|
|
|
Re: diff b/w varchar [message #10553 is a reply to message #10547] |
Fri, 30 January 2004 00:23 |
resy
Messages: 86 Registered: December 2003
|
Member |
|
|
CHAR(n) Fixed length character data of length n bytes. Maximum size is 2000 bytes.
Default and minimum n is 1 byte.
VARCHAR2(n) Variable-length character string having maximum length of n bytes.
Maximum size is 4000, and minimum is 1. No trailing blank spaces are
added and hence the recommended data type for most character columns.
CHAR, NCHAR, VARCHAR2 and NVARCHAR2
Character data types store character data in the database character or national character set.
CHAR[[(n)]]
Fixed-length character data of length n bytes. The maximum length is 2000 bytes, the default value is 1.
NCHAR[[(n)]]
Fixed-length character data of length n characters or bytes, depending on the national character set. The maximum length is determined by the number of bytes required to store each character, with an upper limit of 2000 bytes. The default value is 1.
VARCHAR2(n)
Variable-length character data with length of n characters. The maximum length is 4000 bytes. You must specify the maximum length for VARCHAR2 columns.
NVARCHAR2(n)
Variable-length character data having maximum length n characters or bytes, depending on the national character set. The maximum length is determined by the number of bytes required to store each character, with an upper limit of 4000 bytes. You must specify the maximum length for NVARCHAR2 columns.
|
|
|
Re: diff b/w varchar [message #10561 is a reply to message #10547] |
Fri, 30 January 2004 08:15 |
William Robertson
Messages: 1643 Registered: August 2003 Location: London, UK
|
Senior Member |
|
|
"VARCHAR is currently synonymous with the VARCHAR2 datatype. Oracle recommends that you use VARCHAR2 rather than VARCHAR. In the future, VARCHAR might be defined as a separate datatype used for variable-length character strings compared with different comparison semantics."
|
|
|
|