sql - How to Count Total No.of Columns of a Table(I am in Oracle 10g) -


this question has answer here:

as can count total no.of rows select count(*) table thanks

you can use data dictionary. like

select count(*)   all_tab_columns   owner = <<owner of table>>    , table_name = <<name of table>> 

this assumes code/ session has select access on table in question. if table in schema, use user_tab_columns instead , omit owner. if want view columns of tables don't have access to, use dba_tab_columns instead you'd need additional privileges.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -