How to count total no. of tables existed?

Dear Friends,
I am new to SQL.
While doing practise, I've created a number of tables at the SQL prompt. And now I don't remember the name of all the tables.
So, please suggest an sql statement like how to count the total number of tables existing there.
Your feedback is appreciated.
Kindest regards,
Lalit Sharma

But could you pls be so kind and let me know how to
do this as I mentioned above that I'm new to SQL.Hi,
You would query USER_TABLES in the same way as you would query any of the tables that you have created. :
SELECT column_list
FROM table_name
...

Similar Messages

  • How do I total across multiple Tables? Help!

    how do I total across multiple Tables? Help!
    I feel like a complete noob.

    Hi Marc,
    There is no function explicitly for that sort of array calculation in Numbers.
    My favorite way is to use a list of Table Names and the INDIRECT(ADDRESS) function combination to produce a SUM across tables. I'm making the assumption that you want to do something like adding up all the values in a particular cell of multiple tables.  For example "give me the total of all the A1 cells in tables T1, T2, T3 and T4".  For this I would use the formula:
    =INDIRECT(ADDRESS(1,1,1,,A))
    to grab the cell contents of the table names mentioned in column A of a summary table.  Once you have them collected in your summary table, add them up.
    Here's a screen shot...
    Hope that gives you an idea for approaching this problem.
    Jerry

  • How to count number of Relational Table definitions?

    Hi,
    How can I get the number of tables existing in a particular container? some thing similar to 'select count(1) from tab'. Thanks,

    No, you don't have to be the repository owner or SYS (very bad idea to log in as SYS to do anything except things that ONLY SYS can do, like upgrade the database). You can be any user that has been granted access to the repository via the repository administration utility. With one caveat:
    Before you execute any queries on the CI views, you really ought to activate a workarea with jr_context.set_workarea (workarea_name). This will be GLOBAL_SHARED_WORKAREA if you do not use version control. You must be authorized for the workarea, and will only be able to count table definitions that are in the current workarea.

  • How to count records from 2 tables and show in RDLC Report

    hi all,
    its being a one day searching for the solution but No Luck.
     I have two SQL tables tblstudetail and tblfeereceiptdetail.
    i just want to count records from both tables and show in RDLC report.
    I tried SQl Query Like This:
    select a.session, a.course,
    Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
    Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
    from
    tblstudetail a
    FULL join
    tblfeereceiptdetail s on s.studentID = a.studentID
    where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
    GROUP BY a.session,a.course
    ORDER by a.course
    The result Show the Same Value in Both columns
    Session    Course      Admission       FeeDetail
    2015          B.A. I               275              275
    2015          B.A. II              307             307
    2015         B.A. III             255            255
    2015          B.Sc. I             110             110
    2015           B.Sc. II           105            105
    2015          B.Sc. III            64               64
    Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
    please guide me for this as soon as possible.
    thanks in advance...

    I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
    please suggest me

  • How to Count total number of Words in PDF?

    I am used Adobe Acrobat javascript inbuilt function getPageNumWords(<pagenumber>) it return the number of words present in specified page, but while am copy and paste text content from PDF file to MS Word, Words count given by MS Word is little bit differ, so any one know in which aspect Acrobat count the words?
    Which words count result is correct?
    Shall is go with Acrobat Words count result or MS Words count result?
    But I want to count the total number of words in PDF file (my input is PDF file) else can I go with iText?
    Words count in PDf using iText is possible?

    Word counts are likely to vary a little according to how you count. For instance, are hyphenated words one or two words? What if the hyphen is at the end of a line? Do numbers count as words? Headers and footers? Captions?
    Generally, you just accept a slight variation. If you are counting words in a professional context, i.e. where payment is per word, you probably need a contractual definition of how words are to be counted; in the absence of one, I suggest you use Word.

  • How to count total number of records in mYSQL through JSP ??

    hi
    i want method to count total number of records in table.
    it was there rs.count() method in VB .
    But what about JSP , i used MYSQL database.
    tell me solution please...
    thanks...
    remember JSP - total record count for mySQL

    hello mr.
    i don't want ur suggestion ok
    i know that site.
    no need to give suggestion if u don't give code.
    its better to give proper reply instead of making a
    comment in forum.
    next time take care
    He was perfectly justified in that remark. I have given you the information you need, nicely, twice. But I, and noone else here is going to do your work for you. We will point you in the direction you need to be looking, but we are not going to give code. If you attempt to code something yourself, and it doesn't work, then post the code you tried, and we may make some corrections to it. Then again, with the attitude you've shown so far we probably will not. But one thing no one here will do, is do your work. Especially not for free.
    Now, if you are not willing to sit down, and look at the suggestion that has already been made, and attempt to use it. Then continue wasting your time, but go away and stop wasting our time.

  • How do I check if a table exists

    I have some embedded SQL statements to create tables and indexes
    in a database. These tables may or may not already be there. I
    would like to be able to drop the table(s) first, then create
    them. Unfortunately, an error is generated if I drop a table
    that does not exist.
    Can someone send me the proper SQL command to check if a table
    exists before dropping it in Oracle?
    TIA
    Eric
    null

    I have some embedded SQL statements to create tables and indexes
    in a database. These tables may or may not already be there. I
    would like to be able to drop the table(s) first, then create
    them. Unfortunately, an error is generated if I drop a table
    that does not exist.
    Can someone send me the proper SQL command to check if a table
    exists before dropping it in Oracle?
    TIA
    Eric
    null

  • How to count intials in a table

    I have a table (4 columns) used as a roster for fundraising. The table rows (1st Col) are dates eg; 4-Mar, 11-Mar etc. Columns 2-4 contain a members initials that are rostered for that date. (See below)
    What i would like is to be able to have a separate table (pivot table) that will count & give the number of total occurrences, ie; how many times a member is rostered in a particular period (month/year) Ideally this would update as filling out the roster
    so as to keep the roster spread across members
    MEMBERS
    Date
    M1
    M2
    M3
    4-Mar
    LR
    TM
    BN
    11-Mar
    GM
    AM
    PS
    18-Mar
    AM
    AH
    CA
    25-Mar
    LR
    KK
    AH
    1-Apr
    GM
    CR
    RB
    8-Apr
    TM
    GS
    AM
    15-Apr
    AM
    DA
    AC
    22-Apr
    LR
    CA
    KK
    Thanks in advance for any help

    Hi George
    Thanks for reply. Whilst the end result is what i'm after i'm trying to keep a single row for each date. The reasons are 
    1. As a table i can just tab across to enter member initials. (I may even have the initials as a list in data validation)
    2. Each member (M1, M2, M3) has a specific role to play when rostered on. So they need to know "their number"
    3. The roster will be printed (A4)up for distribution so the more compact the better
    I did think of having members listed in rows with the dates across in columns, but i couldnt get it to work how i wanted & it was also difficult to print on single page (the roster is done 6mth schedules).
    I'm starting to wonder whether i should perhap be looking to MS Access as i could link other data as well (not critical, but then again neither is this, it would just make it easier for me & any subsequent secretary/treasurer)
    I will keep play with options & would welcome any suggestions.
    Cheers

  • [req] how to check whether given oracle table exist or not + C#

    Hi,
    All.
    Actually i m creating a program using C# which connects to the database (oracle) and checks for the given table "OPC_GROUP". if the table doesnt exists then it creates the table else it updates all field with provided values
    code
    cmd.CommandText = "SELECT tname from tab where tname = 'OPC_GROUP'";
    cmd.CommandType = CommandType.Text;
    int length = cmd.ExecuteNonQuery();
    if (cmd.ExecuteNonQuery() >0)
    MessageBox.Show("Table does exist");
    else
    MessageBox.Show("Table doesnt exist");
    But this code return "TABLE DOESNT EXIST" though table is already created
    What i m doing wrong???
    Please help..........
    Thnx in advance

    Try this..
    cmd.CommandText = "SELECT count(*) from tab where tname = 'OPC_GROUP'";
    cmd.CommandType = CommandType.Text;
    string strnum = cmd.ExecuteScalar().ToString();
    if (strnum!="0")
    MessageBox.Show("Table does exist");
    else
    MessageBox.Show("Table doesnt exist");
    Hope it helps,
    Greg

  • How to: Count columns in a table?

    Quite simple question actually. How do I count the number of columns in a table using SQL?

    For AdventureWorks2012 tables & views:
    SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COUNT(COLUMN_NAME ) ColCount
    FROM INFORMATION_SCHEMA.COLUMNS
    GROUP BY TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME
    ORDER BY TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
    TABLE_SCHEMA TABLE_NAME ColCount
    dbo AWBuildVersion 4
    dbo DatabaseLog 8
    dbo ErrorLog 9
    HumanResources Department 4
    HumanResources Employee 16
    HumanResources EmployeeDepartmentHistory 6
    HumanResources EmployeePayHistory 5
    HumanResources JobCandidate 4
    HumanResources Shift 5
    HumanResources vEmployee 18
    HumanResources vEmployeeDepartment 10
    HumanResources vEmployeeDepartmentHistory 11
    HumanResources vJobCandidate 16
    HumanResources vJobCandidateEducation 13
    HumanResources vJobCandidateEmployment 11
    Person Address 9
    Person AddressType 4
    Person BusinessEntity 3
    Person BusinessEntityAddress 5
    Person BusinessEntityContact 5
    Person ContactType 3
    Person CountryRegion 3
    Person EmailAddress 5
    Person Password 5
    Person Person 13
    Person PersonPhone 4
    Person PhoneNumberType 3
    Person StateProvince 8
    Person vAdditionalContactInfo 17
    Person vStateProvinceCountryRegion 7
    Production BillOfMaterials 9
    Production Culture 3
    Production Document 14
    Production Illustration 3
    Production Location 5
    Production Product 25
    Production ProductCategory 4
    Production ProductCostHistory 5
    Production ProductDescription 4
    Production ProductDocument 3
    Production ProductInventory 7
    Production ProductListPriceHistory 5
    Production ProductModel 6
    Production ProductModelIllustration 3
    Production ProductModelProductDescriptionCulture 4
    Production ProductPhoto 6
    Production ProductProductPhoto 4
    Production ProductReview 8
    Production ProductSubcategory 5
    Production ScrapReason 3
    Production TransactionHistory 9
    Production TransactionHistoryArchive 9
    Production UnitMeasure 3
    Production vProductAndDescription 5
    Production vProductModelCatalogDescription 25
    Production vProductModelInstructions 11
    Production WorkOrder 10
    Production WorkOrderRouting 12
    Purchasing ProductVendor 11
    Purchasing PurchaseOrderDetail 11
    Purchasing PurchaseOrderHeader 13
    Purchasing ShipMethod 6
    Purchasing Vendor 8
    Purchasing vVendorWithAddresses 9
    Purchasing vVendorWithContacts 12
    Sales CountryRegionCurrency 3
    Sales CreditCard 6
    Sales Currency 3
    Sales CurrencyRate 7
    Sales Customer 7
    Sales PersonCreditCard 3
    Sales SalesOrderDetail 11
    Sales SalesOrderHeader 26
    Sales SalesOrderHeaderSalesReason 3
    Sales SalesPerson 9
    Sales SalesPersonQuotaHistory 5
    Sales SalesReason 4
    Sales SalesTaxRate 7
    Sales SalesTerritory 10
    Sales SalesTerritoryHistory 6
    Sales ShoppingCartItem 6
    Sales SpecialOffer 11
    Kalman Toth Database & OLAP Architect
    sqlusa.com
    Paperback / Kindle: Pass SQL Exam 70-461 & Job Interview: Programming SQL Server 2012

  • How to count total no of employees?

    HI,
    i got requirement how to get the total count of employees and how many days in the organization, but how to calculate days.
    employee joining date, releasing date, leaves,(CL, optional leaves, restricted leaves) employee salary.
    i created the new selections and formulas its not working for me.
    Thanks,
    Deen.

    Hi,
    create the new formula for the employee count then define the formula.
    hit the aggregation tab -> exception aggregation tab -> select the counter for all details values that are null or zero and reference char -> employee.
    it will give the count of employees.
    leaves,(CL, optional leaves, restricted leaves) for these object you can create the new selections.
    these object getting same info object id yes use the restricted char.
    for joining date and releasing date you convert char to KF using the replacement path then calculate the days.
    Thanks,
    Phani.

  • How to count Total Number of Pages in SAPSCRIPT

    Hi,
    Iam unable to print total number of pages in the First Page of SAPSCRIPT.Iam writing the Logic in the Varibale window.
    Please kindly help me.
    In First Page , The preview is
    Page 1 of 1-
    In Second Page , Teh Preview is
    Page 2 of 2
    The Logic is ....
    1. Variable window of Script
    PERFORM CHECK_PAGE IN PROGRAM ZZZF_SAPSCRIPT_EXITS
    USING &SAPSCRIPT-FORMPAGES&
    CHANGING &WS_PAGE&
    ENDPERFORM
    Page &PAGE(C)& of &WS_PAGE&
    2. Program
    FORM check_page TABLES p_pagein STRUCTURE itcsy
                            p_pageout STRUCTURE itcsy.
      DATA : p_i TYPE sypagno.
       READ TABLE p_pagein INDEX 1.
       IF sy-subrc = 0 .
         p_i = p_pagein-value.
         p_i = p_i - 1 .
    READ TABLE p_pageout INDEX 1.
    CLEAR p_pageout-value.
    *p_pageout-value = p_i+0(3).
    WRITE P_I TO p_pageout-value.
    condense p_pageout-value no-gaps.
         MODIFY p_pageout INDEX sy-tabix.
       ENDIF.
    ENDFORM. "check_page
    Please help me ASAP.
    Regards,
    Deepthi.

    Try this
    'On The Form'
    IF &NEXTPAGE& EQ 0
    DEFINE &DECRE& := '2'
    PERFORM SET_TEXT_SYMBOL IN PROGRAM YSS20200
    USING &SAPSCRIPT-FORMPAGES&
    USING &DECRE&
    ENDPERFORM
    ENDIF
    'In The Program'
    DATA : BEGIN OF script_table OCCURS 0.
    INCLUDE STRUCTURE itcsy.
    DATA END OF script_table.
    Used to modify total pages so they print correctly
    FORM set_text_symbol TABLES input_table LIKE script_table[]
    output_table LIKE script_table[].
    DATA: pageno TYPE i,
    intCnt type i,
    chrPg(2) type c.
    READ TABLE input_table INDEX 1.
    MOVE input_table-VALUE TO pageno.
    READ TABLE input_table INDEX 2.
    MOVE input_table-VALUE TO intCnt.
    subtract intcnt from pageno.
    write pageno to chrpg.
    CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
    EXPORTING
    NAME = 'FORMPAGES'
    VALUE = chrpg
    VALUE_LENGTH = 0
    REPLACE_SYMBOLS = ' '
    ENDFORM.

  • How to test whether a table exists in database?

    How can I test whether a table exists in a database before I execute a query? If the table doesn't exist, I want first create a default table with certain name so that I can always display something in JTable.
    Thanks!

    Hi,
    There are tow ways :
    The first one is :
    - load the list of tables of the Database in a Vector for exemple by using methode DatabaseMetaData.getTables () and you can test if the table exist or not in the vector by using methode Vector.contains(Object o).
    The code seems Like that :
    // Loading List Of Tables
    // you need to load the list of tables at the begening of
    // your class
    Vector listOfTables = new Vector();
    try
    rs = yourConnection.getMetaData().getTables();
    while (rs.next())
    listOfTables.addElement(rs.getString(3));
    catch(SQLException exp)
    // When you need to test the existance of table name
    // you add this line
    if(listOfTables.contains(tableName))
    // your code
    The second one :
    try
    //execute your query
    catch
    //Create your default JTable
    I hope that my response can help you!
    Ciaou,
    Anis

  • Count total page in ABAP list

    Dear Expert,
    Please help me, how to count total page in ABAP list ?
    Any suggestion or idea to solve this question ?
    Thank you.
    Really appreciate your respond and solution.

    In the first statement of ur report u'll have to reserve some lines for footer as follows:
    REPORT <prg name> LINE-COUNT 25(2).
    here ur list will display 23 lines of data and then 2 lines are reserved for footer.
    This means that in each page u can display 23 lines of text.  Now depending on number of entries in your internal table which contains data to be displayed, we can calculate the number of pages required to print the total output.
    E.g: I have 62 records in my internal table, so to get the total number of pages use the following logic:
          (U can find out the number of recs in internal table dynamically using DESCRIBE stmt)
           62/23 = 2.69
           Round the result to the next integer using CEIL , so the next interger is 3.
           So ur total number of pages is 3.  And u now the current page number by sy-pagno.
    Hope this solves ur problem.

  • DB02 shows less total number of tables after UC conversion + OS migration

    Hi,
    We have performed an combined UC conversion and OS migration (BW system on oracle). When comparing the original and migrated system I find in DB02 that in the migrated system the total number of tables is less than in the original system. The migration itself went OK and the system looks fine. I recall that I once heard that tables could be defined to be created when they are called/used for the first time. Is this correct? Could these also be old/non used tables (e.g. left overs from an upgrade) which were still present in the database dictionary but not in the SAP dictionary and were therefor not migrated?
    Thanks,
    Regards,
    Bart

    DB02 counts total number of tables/indecies/views etc in database rather that just SAP tables/indecies/views in database.  The migration process recreates a fresh database and loads tables/indecies/views from source SAP dictionary.  This means table/indecies/views not part of database catalog or in source SAP dictionary don't get created.  This includes objects not owned by db catalog user or SAP connect user.  It also includes objects owned by sap connect user but not known by SAP dictionary.  Under normal operation of some databases, some tables get automatically created.  An example for oracle is PLAN_TABLE as a result of the EXPLAIN SQL command.  Did your source DDIC to db comparison tool show any objects in database but not in dictionary?  If so, these are connect user owned objects that were not migrated.  Does your source system have objects owned by non-db catalog, non-sap connect users (Eg DBA's)?  These wern't migrated.  
    You've already indicated that the SAP connect user counts in source and target are identical.  This is what you moved.

Maybe you are looking for

  • Help in putting movies into pdf with Acrobat 8.0 Pro for a free textbook

    For the next version of my free 1500 page physics text ( download at www.motionmountain.net ) I have big problems. I need to use Acrobat Distiller, I have bought it for this reasons, but I do not get embedded movies to work. Distiller does not find t

  • Gl Postings

    Hi all, I am an abaper who has been saddled with the responsibilty of doing something which i think could be done through functional customizing. My Challenge Goes thus I have a requirement to post  an accounting entry into 2 gl accounts when a migo

  • Do we need a listener class?

    I am trying to create a simple page just to display list of values using javaserver faces.I didn't create any application handler and servlet listener class. Whenever i try to access the page I get this message "The requested resource (/clientList.js

  • Forecast for the current month

    Hello, So we have a monthly forecast entered in SAP B1. When we run MRP, we use that forecast. However, for some reason current month's forecast is never taken into account. Example: today is May 6th and the forecast for May is say 200 cases of item

  • Badi ME_PROCESS_PO_CUST IN ME21N

    HI, I USING BADI ME_PROCESS_PO_CUST IN ME21N IN THIS im_item->GET_SCHEDULES( ). HOW TO GET DATA FROM THIS METHOD.... IF IT POSSABLE PLEASE SEND THE CODE Edited by: Rob Burbank on Mar 12, 2009 9:21 AM