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: 64119
Registered: March 2007
Location: Nanterre, France, http://...
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 Dec 06 10:28:33 CST 2016

Total time taken to generate the page: 0.19965 seconds