Toad World® Forums

What SQL used to Describe Table column Data Type ?

I am using TOAD for Oracle Base version

I want to know what SQL query does get exectued to show us table column data type

I created a table with column Interger, In DBA/ALL/USER table cols Oracle doesn’t maintain that data type integer

rather It plays on Scale and Precision and SQL Developer too follow this patter but I think TOAD is smart enough to detect :slight_smile: so I am curious and want to use that SQL in my reporting page.

Any help would be much appreciated

Not sure if this will help you:

select *

from all_tab_columns

where table_name = <TABLE_NAME>;

To see what SQLs Toad is executing, from the main menu, click: Database -> Spool SQL -> Spool to screen.

When you create a column as INTEGER, Oracle stores that in the data dictionary as NUMBER with data_length=22, precision=null, and scale=0. But you won’t see that logic in any of Toad’s queries.