I'm new to Oracle db, and i wonder if i can find out the datatype and datasize... I mean : let's say i have the column "location" of type varchar2(20) in table "products". Could i write a query that would return me in the result "varchar2" and "20" ?
Thank you!
If you only need to know it for your knowledge, typing desc tablename in SQLPlus will tell you about the columns in the table.
SELECT MAX( LENGTH( air_carrier ) ) FROM flight; SELECT MAX( LENGTH( name ) ) FROM arpt; and so on. Hope this helps.
Check out user_tab_columns.
select data_type, data_length
from user_tab_columns
where table_name = 'PRODUCTS'
and column_name = 'LOCATION';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With