SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Nov 2008
    Location
    internettrix.blogspot.com
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can we count number of columns in a table

    i want to know ..............can i count the number if columns are already exist in a table+oracle

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use google....
    The 4 firsts results are giving you your answer.

    http://www.google.com/search?q=oracl...ient=firefox-a
    1) Adapted from response by Dragan Pavlovic on Thursday, October 31, 2002

    select COUNT(COLUMN_NAME)
    from dba_tab_columns
    where table_name = 'NAME_OF_THE_TABLE_CAPITALS'
    AND OWNER='SCHEMA_NAME_CAPITALS'

    2) Adapted from response by Scott Tolbert on Thursday, October 31, 2002

    select COUNT(*) from dba_tab_columns
    where table_name = YourTableNameHere;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •