Home » SQL & PL/SQL » SQL & PL/SQL » count
count [message #35948] Thu, 25 October 2001 07:08 Go to next message
neru
Messages: 2
Registered: October 2001
Junior Member
Hi,
Is there any way to make count of the number of columns
in a table.
ex: table A has 100 columns

Thanks

----------------------------------------------------------------------
Re: count [message #35953 is a reply to message #35948] Thu, 25 October 2001 08:52 Go to previous messageGo to next message
Jon
Messages: 483
Registered: May 2001
Senior Member
select table_name, count(column_name) from all_tab_columns
where owner = 'xxx'
/* and table_name = tableA */
group by table_name

----------------------------------------------------------------------
Re: count [message #35983 is a reply to message #35948] Sun, 28 October 2001 20:30 Go to previous message
akkiraju kiran kumar
Messages: 6
Registered: October 2001
Junior Member
hai,
To find how many columns in a specific table.
To get this first decide in which schema the
table is exist.
For Example i am considering SCOTT schema having the table EMP.
so to find out the columns in this criteria

select count(*) from all_Tab_columns
where table_name='EMP' and owner='SCOTT'
bye
best of luck

----------------------------------------------------------------------
Previous Topic: Re: to create a table structure from an existing structure
Next Topic: Running a BAT file from PL-SQL
Goto Forum:
  


Current Time: Fri May 27 13:52:25 CDT 2022