Count the total number of rows found in the schema

Count the total number of lines present in the schema, including the table, sequence, view

Desirable output

Table sequence views
20 of 1000 1000

Do you mean that you need to count the number of Tables, views and sequence present in the schema?

Hi something like that.

SELECT a.view_cnt AS "View Count", b.tab_cnt AS "Table Count",
       c.seq_cnt AS "Sequence Count"
  FROM (SELECT COUNT (*) view_cnt
          FROM USER_VIEWS) a,
       (SELECT COUNT (*) tab_cnt
          FROM USER_TABLES) b,
       (SELECT COUNT (*) seq_cnt
          FROM USER_SEQUENCES) c

Gives you,

View Count      Table Count      Sequence Count
       153              878                   32

Thank you
Shankar

Published by: Shankar Viji on August 28, 2012 03:03

Tags: Database

Similar Questions

  • total number of rows returned, how to learn it

    Hello
    I think that in Oracle should be some simple var which contains the number of rows returned, can someone help me with this.
    I actually do it:
    INSERT INTO TT_1 SELECT * FROM TT_2 WHERE COND_01.

    Here so get the total number of rows populated without COUNT (*) extra.


    TX
    TR

    If you want to see in PL/SQL you can do it like this:

    SQL> set serveroutput on
    SQL> create table t1 as select * from all_tables where 1 = 0;
    
    Table created
    SQL> BEGIN
      2    INSERT INTO t1 SELECT * FROM all_tables;
      3    dbms_output.put_line('Rows inserted: ' || SQL%ROWCOUNT);
      4  END;
      5  /
    
    Rows inserted: 2238
    
    PL/SQL procedure successfully completed
    
    SQL> 
    
  • How to display the total number of rows in the dashboard

    Hello

    I have a dashboard report for retrieving the list of projects and details, it grows on a daily basis, instead of users downloading the report and find out the total number of projects, I want to display 'the total number of projects' alone in the dashboard. How can I do?

    Also is it possible to do like a pop up or something a little flash news - not necessary, but will be very good if I can do it.

    Thanks for your time and your help.

    create a report and a column to write a column invert the function max (rcount (1)). Call this column depending on the position of the column (as @1) in narrative mode.
    You can view only the narrative in the dashboard.

    for flash type of report, you can use the ticker view and call the same column in the view.

    refer to this link to view the total number of records
    http://Siebel.ITtoolbox.com/groups/technical-functional/Siebel-Analytics-l/display-row-count-in-top-of-the-table-view-3704999

    assign points if found useful.

  • total number of rows in the result

    Hello..

    I have a query_x with columns Col1, Col2, Col3 following and would like to get the total number of lines for my query_x so

    -Query_x
    SELECT
    Col1,
    Col2,
    COL3

    Of
    X, Y, Z

    WHERE
    ...=..

    Group
    Col1,
    Col2,
    COL3

    Thanx
    SQL> select empno, ename , sal, count(*) over (order by null) total_rows from emp ;
    
         EMPNO ENAME             SAL TOTAL_ROWS
    ---------- ---------- ---------- ----------
          7369 SMITH             800         14
          7499 ALLEN            1600         14
          7521 WARD             1250         14
          7566 JONES            2975         14
          7654 MARTIN           1250         14
          7698 BLAKE            2850         14
          7934 MILLER           1300         14
          7788 SCOTT            3000         14
          7839 KING             5000         14
          7844 TURNER           1500         14
          7876 ADAMS            1100         14
          7900 JAMES             950         14
          7902 FORD             3000         14
          7782 CLARK            2450         14
    
    14 rows selected.
    

    HTH
    SS

  • Get the number of rows in the oracle table

    Hi all
    I want to get the total number of rows in the sql to the appmodule table.
    After you apply the criteria to view some on the view object. If he try with getallrowsinrange the number of rows found within the viewobject was but I want a total number of rows in the sql table.

    How can I get that

    I use jdev 11.1.1.5

    Thanks in advance

    I threw something together, quick and dirty, don't hesitate to optimize.

    Assuming you want the County table, I put the code in a subclass of EntityDefImpl since it is representing a table in the middle tier.

    public class EmpDefImpl
          extends EntityDefImpl {
      /**
       * This is the default constructor (do not remove).
       */
      public EmpDefImpl( ) {}
    
      //~ Methods ****************************************************************************
    
      public long getTableRowCount( DBTransaction transaction ) {
        String query = getQuery( );
        String countQuery = String.format( "SELECT COUNT(*) FROM (%s)", query );
        long count = 0;
    
        ViewObject vo = transaction.createViewObjectFromQueryStmt( countQuery );
    
        try {
          vo.executeQuery( );
    
          Row row = vo.first( );
          Number number = (Number)row.getAttribute( 0 );
          count = number.longValue( );
        } finally {
          vo.remove( );
        }
    
        return count;
      }
    }
    

    Depending on your card type, you may not get an oracle.jbo.domain.Number, but something else, so the cast may need correction.

    Usage example:

    public class EmpEditViewImpl extends ViewObjectImpl {
      public EmpEditViewImpl() {
      }
    
      protected void executeQueryForCollection( Object object, Object[] object2, int i ) {
        super.executeQueryForCollection( object, object2, i );
    
        EmpDefImpl def = ( EmpDefImpl )getEntityDef( 0 );
        long tableRowCount = def.getTableRowCount( getDBTransaction() ) );
    
        // Do something with it
      }
    }
    

    As you can see, the code is fairly generic. Also, you might be able to put this in a base extension ADF class.

    Sascha

    Published by: Sascha Herrmann on June 7, 2012 14:39

  • What is the maximum number of rows for lists and DataGrids?

    Anyone know?

    Or at least to know if the maximum value allowed is based on the total number of rows or cells?

    I'd appreciate any help.

    You'll run out of memory before running the other stuff.  Length is an int.

    While it can hold 2

  • Add the number of rows in the table on the Page Framework OA

    Hi all

    I need to add a line at the bottom of a table in the OA framework to display the number of lines for the underlying table VO. Can someone point me in the right direction to get there?

    Thanks in advance!

    Kristopher

    Hi Kristopher,

    As directed by your post, my understanding is that you want to have a line at the bottom of the table that contains a field that displays the number of rows found in the t... RT?

    You can implement the same in the following way,
    You can add a footer to your table and add a messageStyledText point in it. At this point, you can assign the value of VO.getFetchedRowCount ().

    Hope this is what you are looking for.

    Kind regards
    REDA Papdeja

  • Automatically count the total number of steps

    I have a procedure with x steps. In the title manually type us the total number of steps. As you can understand this process often translates into a failure, where the number in the title does not match the actual number of steps.

    Is there a solution for automatically Indesign to count the steps below a certain style of paragraph and add the title number. I did find something similar.

    For example, where '5' in the title is automatically generated:

    How to count (5 steps)

    1. Be patient, start whispering 'a '.
    2. Then mentally count to two...
    3. ... three
    4. ... four
    5. Crying all of a sudden 'five' and pretend that nothing takes place.

    Thanks in advance

    This can be done very easily by the script. I wrote it while drinking my coffee in the morning.

    Front

    After

    I don't know what style names that you use so I used 'Header' and 'steps '. Change them to your style of the script name (in a text editor - Notepad for example, ESTK):

    If you add / remove certain steps, run the script again and it will update the numbers.

    Here is the script and here is an example document for the test.

    DISCLAIMER: I did not see your documents, so can't promise it will work for you, as it is.

    /* Copyright 2014, Kasyan Servetsky
    June 4, 2014
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */
    //======================================================================================
    var scriptName = "Count number of steps - 1.1",
    doc;
    
    PreCheck();
    
    //===================================== FUNCTIONS ======================================
    function Main() {
        var foundItem, header, lastPar, num;
    
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat = "(?s).+";
        app.findGrepPreferences.appliedParagraphStyle = "Steps";
        var foundItems = doc.findGrep(true);
        if (foundItems.length == 0) ErrorExit("Found nothing", true);
    
        for (var i = 0; i < foundItems.length; i++) {
            foundItem = foundItems[i];
            if (foundItem.paragraphs.length == 0) continue;
            header = foundItem.parentStory.paragraphs.previousItem(foundItem.paragraphs[0]);
            if (header.appliedParagraphStyle.name != "Header") continue;
            lastPar = foundItem.paragraphs[-1];
            num = lastPar.numberingResultNumber;
            if (num == -1) continue;
            InsertNum(header, num);
        }
    
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function InsertNum(header, num) {
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat = "( \\()(\\d+)( Steps\\))$";
        app.changeGrepPreferences.changeTo = "$1" + num + "$3";
        app.findGrepPreferences.appliedParagraphStyle = "Header";
        var changed = header.changeGrep();
    
        if (changed.length == 0) {
            header.insertionPoints[-2].contents = " (" + num + " Steps)";
        }
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function PreCheck() {
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
        doc = app.activeDocument;
        if (!app.activeDocument.saved) ErrorExit("The current document has not been saved since it was created. Please save the document and try again.", true);
        Main();
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    
  • Added a counter which keeps the total number of times where a loop has run, even if LabVIEW has been restarted.

    Hi all

    I am writing a VI to measure the data and insert into a database. The measures are controlled by a loop that runs once per minute. I want to give a unique to each measure identification number and store it too much in the database.

    To do this, I want to add a counter to this loop so that I can count the number of times that the loop is executed in total. It is, even if the VI, LabVIEW or even e PC is restarted, I want the counter to track the number of executions. If say the Edeka runs twice and then the VI is stopped and restarted, I want the number following on the counter to be three.

    Does anyone have an idea on how to do it? I'm gratefule for any help!

    Clara

    A suggestion. Can you write the last counter value in a txt file and read it all by running again the vi?

  • Function to count the total number of data channels

    I know that I had stumbled on a tiara function that returns the number of data in all of my data channels.  I can't seem to find the thread where I had seen it.  I'm looking to replace a script a long time user with this simple function in my future coding.

    Thank you!

    Hi CrshTstr,

    I actually still use GlobUsedChn for that.  In more recent versions of DIAdem, you can use commads as GroupChnCount() or Data.Root.ChannelGroups (1). Channels.Count to return the number of channels in a particular group.  But regardless of which group the channels are in the GlobUsedChn variable always returns the total number of channels currently on the data portal.

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • Count the number of rows in a table (s)

    Hi all

    I have a TKT_PRIORITY_LK table that I want to count the number of rows returned by a priority level... say Low, Medium, High, critical. I want to be able to count how many of each created are they, instead returning ID instead, if making any sense... Can you please help with this.

    Example; Select count (*) in TKT_PRIORITY_LK

    PRIORITY group

    Kind regards

    Sandrine

    Try this

    Select a.PRIORITY, count (*) from TKT_PRIORITY_LK a, TKT_TICKET_MAIN b

    where a.id = b.PRIORITY_ID

    A.PRIORITY group

  • A script that will count the total number of pages into multiple PDF files in a batch file?

    Is there a script I can use ExtendScript Toolkit that will count the total number of pages into multiple PDF files in a batch file?

    In another discussion I showed a JavaScript that you can use to write the number of pages to the console in a batch sequence. You would do exactly the same thing in Action, so the action would consist of a simple JavaScript (more tools > run JavaScript) which includes the code.

  • Count the number of rows returned from each view in USER_VIEWS

    For each USER_VIEWS view, I would return the name, creation date, last modified dateand the number of rows returned by this view.

    Here's what I have so far:
    col object_name format a20
    select 
    object_name, 
    created, 
    last_ddl_time
    from user_objects
    where object_type = 'VIEW'
    Returns:
    OBJECT_NAME          CREATED   LAST_DDL_TIME
    -------------------- --------- -------------
    AISLE_AVG            11-FEB-12 11-FEB-12     
    COURSE_AVG           11-FEB-12 20-FEB-12     
    EXE_12_VIEW          11-FEB-12 21-FEB-12     
    L1_P2                17-FEB-12 17-FEB-12     
    L1_P3                17-FEB-12 17-FEB-12     
    L1_P4                17-FEB-12 17-FEB-12     
    L1_P5A               17-FEB-12 17-FEB-12     
    L1_P5B               17-FEB-12 17-FEB-12     
    LAB3_1A              12-FEB-12 20-FEB-12     
    LAB3_1B              12-FEB-12 20-FEB-12     
    LAB3_2A              12-FEB-12 20-FEB-12     
    LAB3_2B              12-FEB-12 20-FEB-12     
    LAB5_1               19-FEB-12 19-FEB-12     
    LAB5_2               19-FEB-12 19-FEB-12     
    LAB5_3               19-FEB-12 19-FEB-12     
    LAB5_4               19-FEB-12 19-FEB-12     
    LAB5_5               19-FEB-12 19-FEB-12     
    LAB5_TIMES           19-FEB-12 19-FEB-12     
    LAB6_1               19-FEB-12 19-FEB-12     
    LAB7_VIEW            20-FEB-12 20-FEB-12     
    PROGRAMS             11-FEB-12 21-FEB-12     
    STUDENT_GPA          11-FEB-12 21-FEB-12     
    
     22 rows selected 
    How can I add a last column that counts the number of rows returned by this view?

    EDIT - here is a dump of my paintings, and here are my views.

    Edit2 - this is possible by using the DECODE function, by chance?

    The function...

    CREATE OR REPLACE FUNCTION view_row_count (view_name VARCHAR2)
    RETURN NUMBER
    AS
    retval NUMBER;
    BEGIN
    EXECUTE IMMEDIATE
    'select count(*) from '||view_name INTO retval;
    RETURN retval;
    END view_row_count;
    /
    

    And now the query...

    select
    object_name,
    created,
    last_ddl_time,
    view_row_count(object_name) as view_row_count
    from user_objects
    where object_type = 'VIEW'
    
  • Count the total number of specific words on each page

    I have a script that counts the number of times where the word 'Manager' is displayed on each page of a report.

    This is what is returned in the console after running the script:

    Count the number of managers 1 Page number 1

    Count the number of managers 2 Page number 1

    Count the number of managers 3 Page number 1

    Count the number of managers 4 Page number 1

    Count the number of managers 5 Page number 1

    Count the number of managers 1 Page number 2

    Count the number of managers 2 Page number 2

    Count the number of managers 3 Page number 2

    I need the console to report with only the total number of times that the word Manager appears on each page (once) and not iterate over each of them.

    Can someone please advise how this can be achieved?

    Script as follows:

    var this.numPages = NUMPAGES;

    for (var k = 0; k < numpages; k ++)
    {
    {
    numWords var = this.getPageNumWords (k);

    var number = 0;

    for (var i = 0; i < numWords; i ++)
    {
    var ckWord = this.getPageNthWord (k, i, true);
    var q = this.getPageNthWordQuads (k, i);
    Convert quads in the rotation by default user space
    Userspace used by links.
    m = (new Matrix2D).fromRotated(this,0);
    mInv = m.invert)
    r = mInv.transform (q)
    r = r.ToString)
    r = r.split(",");
    If (ckWord = "Manager")
    {
    Count ++;
    Console.println ("Count none managers" + count + "Number of Page" + (k + 1));
    }
    }
    }
    }

    Just move the statement outside the inner loop:

    var this.numPages = NUMPAGES;

    for (var k = 0; k)< numpages;="" k++)="">

    numWords var = this.getPageNumWords (k);

    var number = 0;

    for (var i = 0; i)< numwords;="" i++)="">

    var ckWord = this.getPageNthWord (k, i, true);

    var q = this.getPageNthWordQuads (k, i);

    If (ckWord = 'Manager') {}

    Count ++;

    }

    }

    Console.println ("Count none managers" + count + "Number of Page" + (k + 1));

    }

  • How to count the total number of records with distinction?

    Hello guys

    I have a report that contains a list of the types of company and other attributes as follows:
    Shipto               Company Type             GC Code               Measures
    A                         cc                             x                          100
                                                               y                          200
                                                               c                          120
    
    B                         YUT                         I                            200
                                cc                           U                           98
    
    G                         Maid                        rt                           200
                               YUT                        TT                         300
                               JTE                         TY                         400
    
                               
     
    The list goes on and... "Business type" appears is not the highest or the lowest... I would like to see what is the total number of different company types we have. By this report, there should be 5, but if I count or count (*) or rcompte, I actually get the total number of lines in the present report, which is not what I want...

    If someone could help me to find the total number of company types?

    Thanks in advance

    Have you tried this one?

    Sum (Count (distinct ColumnName))

Maybe you are looking for

  • Keyword not valid non-atome

    Hello I use TB 24.7.0.Something weird is happening today with tuberculosis.I have some configuration of filters to assign specific tags for the incoming mails. Everything was fine until today.What is more strange is that I didn't tamper with all filt

  • Onboard HD video cam does not

    The integrated video camear does not work although the device manager says it's working properly.  There is one of installed driver USB video camera can someone advise if this is the driver of a built-in camera? They are one and the same or would the

  • Reference Dell 962 controllers

    Saludos requiero una Patrick del 962 en windows seven instalar, y no me reconoce, sabe alguien como hacerlo... gracias

  • How can I get my percentage of enlargement on the taskbar?

    The type is really small to read. I don't want to set the fonts larger etc in the implementation.The "percentages" of 100%, 125%, 150%, 200%, seem to have disappeared with the upagrade to IE8

  • FlashUtil should appear in the Task Manager?

    Vista Home premium 32-bit Browser IE7 Notice when I open my browser (IE7), then in the Manager tasks as flashutil10 in the Task Manager I never noticed this before, is this normal? Of course when I close my browser, the entry goes into the Task Manag