How do i find the total number of fields within all tables in one of my databases

I'm in the process of creating some "gee whiz" metrics for one of my applications and want to find the total number of columns contained in its database.  Is there a stored procedure to get this information that would save me the effort
of opening each of my 66 tables and counting the columns?  I also have the same question for my 138 views.  Thank you for any ideas you care to offer...............Phil Hoop
Phil Hoop

Hi Phil,
Assumes SQL 2005 or higher
Let 's try simple one ....
SELECT COUNT(col.column_name), col.table_name
FROM information_schema.columns col
JOIN information_schema.tables tbl
ON tbl.table_name = col.table_name
AND tbl.table_schema = col.table_schema
AND tbl.table_catalog = col.table_catalog
AND tbl.table_type = 'VIEW'
GROUP BY col.table_name
Let me know if this will help you.
If you think my suggestion is useful, please rate it as helpful.
If it has helped you to resolve the problem, please Mark it as Answer.
Varinder Sandhu www.varindersandhu.in

Similar Messages

  • How do I find the total number of elements in a multi dim array

    How do I find the total number of elements in a single or multi dim array?
    For example, a 2x3 array has 6 elements, and a 2x3x4 has 24. How do I compute this very easily - is there a single VI that does this?
    David
    Solved!
    Go to Solution.

    Use "array size" (array palette) followed by "multiply array elements" (numeric palette)
    (Works also equally well for 3D arrays and higher)
    For a 1D array, just use "array size".
    Message Edited by altenbach on 02-05-2009 05:57 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    NumberOfElements.png ‏3 KB

  • How can I find the total number of songs in my iTunes library?

    I just downloaded the new itunes.  In the previous itune library at the bottom of the screen it told me how many songs I have total.  Not just purchased, but how many total songs were in my library.  I liked knowing this because I could verify my ipod was synced up properly.  Sometimes a song wouldn't download from my computer to my ipod, and by knowing how many songs were in the library, it was a double check.
    This song count is gone now with this new itune version.  There no bar at the bottom of my screen that shows me song count and I've gone through all the settings and can't figure out how to know this without manually counting the songs.  Any help is appreciated.

    Dear,
    In the top menu, you can choose 'view', and subsequently 'show status bar'. This shows the information on the bottom of the window.
    kindest regards,

  • How do I find the total number points per plot on a CNiGraph?

    There dosn't appear to be a method in CNiPlot.

    Hey wingnut,
    When you plotted to the graph you passed an array of data to it.  Or you passed one point at a time to it.  Basically what Chris is saying is that you need to retain this data somewhere and count the number of points plotted. 
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How can I find out the total number of gigabytes of all my photos in Iphoto?

    How can I find out the total number of gigabytes of all my photos in Iphoto?

    In the Event mode open the Info window at the bottom left  (Command+i or click on the blue i button).  Then select all of the Events.  The number of photos and size will be shown in the Info window at the right.
    OT

  • How do I print the total number of pages in report, like Page 1 of 5?

    Hi
    How do I print the total number of pages in report, like Page 1 of 5?
    thanks,
    kiran.M

    Hi,
    Check for the below code:
    *Declare a variable
    DATA L_PAGE_COUNT(5) TYPE C.
    *Copy this code to the end of program
    *Page count will be printed on each page here
    WRITE SY-PAGNO TO L_PAGE_COUNT LEFT-JUSTIFIED.
    DO SY-PAGNO TIMES.
    READ LINE 1 OF PAGE SY-INDEX.
    REPLACE '-----' WITH L_PAGE_COUNT INTO SY-LISEL.
    MODIFY CURRENT LINE.
    ENDDO.
    TOP-OF-PAGE.
    WRITE: /(70) 'Heading' CENTERED, 70 SY-PAGNO,'of ', '-----'.
    You will find your solution in below thread with code:
    Total Pages in Basic List
    Rgds,
    Shakuntala

  • How can I find the serial number for my creative suite CS6 I bought it from a store.

    How can I find the serial number for my creative suite CS6 I bought it from a store.

    https://www.adobe.com/account.html for serial numbers or subscriptions on your Adobe page... or
    Lost serial # http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • How can we find the Idoc number which posts the material document in SAP

    Hi All,
    How can we find the Idoc number which posts the material document in SAP. We could not able to find the IDOC number from the material document which was posted by Idoc.
    Thanks
    Chandru

    Hi,
    In MIGO you can go to service of object(Just above show overview) and check 5th option workflow you will find the idoc number.
    regards
    suresh

  • How do I find the serial number of a stolen Ipod touch?

    Unfortunately, we lost the serial number of our touch - now it was stolen. How can we find the serial number - I thought it would be registered under my iTunes-account... Any ideas? Thanks.

    You can get the serial number in iTunes by heading to Edit->Preferences.  Then when the window comes up, click the Devices tab and hover your mouse over one the iPod's backup.  It should then display it's serial #.
    Or look in the places described here if at all possible.
    iPod: How to find the serial number
    B-rock

  • How do I find the model number of a MacBook

    A friend of mine has a MacBook that won't start up. How do I find the model number of her MacBook? A number like MBXXXLL/A or MAXXXLL/A.

    HI,
    Do you meant he serial number? If so, click the Apple Menu  then click: About This Mac. You will see Mac O S X. Under that click where you see: Version 10.x.x, then click one more time to see the serial number.
    You can also view this information by launching the System Profiler (Applications/Utilties)
    On the left under Contents select Hardware. The serial number will be displayed on the right.
    Just out of curiosity, how is knowing the serial number going to help trouble shoot this MacBook ??
    Carolyn

  • How do I find the Serial number of a locked iphone?

    How do I find the Serial number of a locked iphone?

    Thanks but unfortunately I don't have any of those items to do that. Just have the phone. We are a third party support provider for Pharma companies and they send in their HW when users leave the company or are let go. This particular client deployed this device outside of our company at some point so we did not have the luxury of recording that info when deployed. We also cannot reach the original user to obtain the passcode. All we need is the serial number but need a way to access that on the phone without the passcode and without resetting or restoring the phones IOS.

  • How do I find the serial number for my VirusBarrier Plus software downloaded from App Store

    I have dowloaded VirusBarrier  Plus software from the apps store and need a serial number to register. How do I find the serial number.
    Peter

    I would recommend contacting the vendor or maker of the software for support.

  • How can I find the serial number for my stolen iPad that's associated with my apple ID ?

    How can I find the serial number for my stolen iPad that's associated with my apple ID ?

    If you registered it with Apple check your registered items at Your Support Profile for Registered Purchases. Also, see iOS- How to find the serial number, IMEI, MEID, CDN, and ICCID number.
    What To Do If Your iDevice Is Lost Or Stolen
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • HT1338 how do i find the serial number on my macbook pro

    How do I find the serial number on my Macbook Pro?

    How to find the serial number of your Apple hardware product

  • How do I find the model number on my keyboard?

    How do I find the model number on my keyboard? I have an anodised aluminium (short with no numeric pad on it) keyboard that came with my iMac that I bought in 2009, and I am wanting to find out what model it is.
    Any suggestions?
    Thanks.

    Many of the Apple keyboards have the model number on the underside, often in very tiny grey print that is really, really hard to read
    You can also go to the Apple symbol in the top left corner of your screen, drop down to About this Mac, then click more Info and navigate to the the hardware information about the interfacing equipment.
    If you have your original order information from purchase, it may list each item you received with model/part number.
    Ralph

Maybe you are looking for

  • Inventory Valuation based on Sales Order Costing

    Dear All My client requirement is the inventory value should happen based on the "Sales Order Cost Estimate" Kindly give the configuration steps, if it is possible in SAP Regards Anilkumar

  • Rounding ruels for cash discount

    Hi, Can any one help me Client want the discount should be rounded, i.e., if the discount value is 25.42 it should be 25 & if it is 25.51, value should be 26 Thanks & regards Kareem

  • Servlet: "The requested resource is not available"

    I'm trying to get my first servlet to run. I've installed tomcat 4.1.18 and compiled a "HelloWorld" class into "tomcat_dir"\webapps\root\web-inf\classes\. when I start tomcat, then open my browser and key "http://localhost:8080/servlet/HelloWorld" I

  • Performance issue with the table use vrkpa

    Hi. here is the selection criteria that i am using and the table use vrkpa i only used to map the table kna1 and vbrk.vbrk and kna1 doesnot have the direct primary key relationship. please check and let me know wht this vrkpa is taking time and how c

  • What is the cost of Adobe Distiller Server?

    Hi, My project requirement is to convert Word Doc files to Pdf files using ASP.Net 2.0. I am interested to use Adobe Distiller Server for this. Can anyone please guide me as to how much this product will cost me and the Server Licence for upto 100 us