Home » RDBMS Server » Server Administration » Column of varchar2(4000)
Column of varchar2(4000) [message #51786] Thu, 13 June 2002 11:07 Go to next message
Heather
Messages: 2
Registered: June 2002
Junior Member
Question: If I create a column with size of 4000 and that size is not fully utilized by each record, is this wasting space? Does Oracle actually save that amount of space for the record in case it is ever populated? Thanks for any information!
Re: Column of varchar2(4000) [message #51787 is a reply to message #51786] Thu, 13 June 2002 11:24 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
[code]I beleive, it depends on the datatype.
if u have created the column as Varchar2 datatype then the unused space is truncated for every column.
If you have created the same with char datatype then it is not so. wiz, there is space still occupied there.
The following demo may explain that.

SQL> create table test50
2 (name char(10),
3 address varchar2(100));

Table created.

SQL> insert into test50 values('mag','12,nowhere street, somewherehere In this town');

1 row created.

SQL> select length(name),length(address) from test50;

LENGTH(NAME) LENGTH(ADDRESS)
------------ ---------------
10 45


Re: Column of varchar2(4000) [message #51793 is a reply to message #51786] Thu, 13 June 2002 12:19 Go to previous message
Heather
Messages: 2
Registered: June 2002
Junior Member
Thanks for the information and the speedy response!
Previous Topic: Regarding partitions
Next Topic: Enterprise edition & PO
Goto Forum:
  


Current Time: Wed Dec 25 20:07:48 CST 2024