Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save StuffbyYuki/1a4e628ab8eb72e5dfa31af8ec687ca1 to your computer and use it in GitHub Desktop.

Select an option

Save StuffbyYuki/1a4e628ab8eb72e5dfa31af8ec687ca1 to your computer and use it in GitHub Desktop.
SQL:Oracle - Show the number of columns in a table
select count(*)
from all_tab_columns
where owner = 'SOME_USER' --put yours
and table_name = 'SOME_TABLE'; --put yours in upper case. lower(table_name) for lower case
/*
e.g.
select count(*)
from all_tab_columns
where owner = 'IRIRPT'
and table_name = 'STUDENT_TABLE';
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment