Home » Other » General » DOUBT IN USER_TAB_COLUMNS
DOUBT IN USER_TAB_COLUMNS [message #259560] Thu, 16 August 2007 00:12 Go to next message
meeta
Messages: 28
Registered: January 2000
Junior Member
Hi,
I have 1 small doubt in contents of table USER_TAB_COLUMNS
DATA_LENGTH shows the length of columns in byte and for number columns it is DATA_PRECISION, But for number columns only there is some value in DATA_LENGTH column, what is that value
eg->
SQL>SELECT * FROM USER_TAB_COLUMNS WHERE TABLE_NAME='ABC';
TABLE_NAME COLUMN_NAME  DATA_TYPE DATA_LENGTH DATA_PRECISION
ABC         SAL         NUMBER      22            6

SQL>Desc ABC
SAL NUMBER(6)

I want to ask what is this 22 in DATA_LENGTH column

Re: DOUBT IN USER_TAB_COLUMNS [message #259567 is a reply to message #259560] Thu, 16 August 2007 00:23 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Data length is fixed in case of number. If I create a table that contains a column whose data type is number then it will take 22 bytes data length. and data precision you can specify. if you specify number(10) then data precision 10.
Re: DOUBT IN USER_TAB_COLUMNS [message #259585 is a reply to message #259560] Thu, 16 August 2007 00:58 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
It gives the maximum size that the field can take.

Regards
Michel
Previous Topic: Prevent 10g r2 Schedules running in TEST environment
Next Topic: Purely Oracle Professional!
Goto Forum:
  


Current Time: Tue Nov 26 16:46:50 CST 2024