How to know the the list of tables with no rows inside a schema?

with reference to
http://www.ss64.com/orad/USER_TABLES.html
How to know the the list of tables with no rows inside a schema?
I try this select table_name from user_tables where num_rows=0;
I can found one table that is empty.
So what's the query to return list of tables in a schema which has no rows?
thanks

You can do that only if your have collected the stats properly. Otherwise its going to show you wrong information.
Check this out...
SQL> drop table t
  2  /
Table dropped.
SQL> create table t
  2  as
  3  select level no from dual connect by level <=100
  4  /
Table created.
SQL> select table_name,num_rows from user_tables where table_name = 'T'
  2  /
TABLE_NAME                       NUM_ROWS
T
SQL> begin
  2      dbms_stats.gather_table_stats(user,'T');
  3  end;
  4  /
PL/SQL procedure successfully completed.
SQL> select table_name,num_rows from user_tables where table_name = 'T'
  2  /
TABLE_NAME                       NUM_ROWS
T                                     100
SQL>Thanks,
Karthick.

Similar Messages

  • Issue in retrieving all the records from ADF Table with multiple row

    Hi,
    As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
    I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
    But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
    Please let me know what is the issue in my source code.
    ADD Method:
    public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){       
    try{
    Row row = this.getCmProcessParamValueView1().createRow();
    row.setAttribute("ParamValue7", commType);
    row.setAttribute("ProcessType", processType);
    row.setAttribute("CreationDate", new Date());
    row.setAttribute("CreatedBy", uid);
    row.setAttribute("ParamValueSeqNum", seqNumber);
    row.setAttribute("ProcessedFlag", "N");
    this.getCmProcessParamValueView1().insertRow(row);
    }catch(Exception e){           
    e.printStackTrace();
    Table Code:
    <af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView11.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="100%" inlineStyle="height:100px;" >
    <af:column sortProperty="ParamValue6"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    id="c1" visible="false">
    <af:inputText value="#{row.bindings.ParamValue6.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.ParamValue6.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue7"
    sortable="true"
    headerText="Comm Type"
    id="c2">
    <af:inputText value="#{row.bindings.ParamValue7.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.ParamValue7.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue8"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    id="c3" visible="false">
    <af:inputText value="#{row.bindings.ParamValue8.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.ParamValue8.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    Backing Bean Code:
    DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
    if (rs.getRowCount() > 0) {
    Row row = rs.first();
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    while (rs.hasNext()) {
    int count = rs.getRowCount();
    System.out.println("Count is : "+ count);
    Row row = rs.next();
    System.out.println("Row === "+ row);
    if(row != null){                   
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    Thanks.

    Issue resolved.
    remove selectionListener and selectedRowKeys....
    code to get all the selectedRows.
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    Thanks.

  • How to know whether the javascript is disabled or not while loading the jsp

    Hi,
    My query is like how to know whether the javascript is disabled or not while loading the Application main JSP in Mozilla browser.
    I want some Java code or JavaScript code.

    To the point, just let JS fire a specific HTTP request inside the same session.
    This can be done in several ways. 1) Create a hidden <img> element and set the `src` attribute so that it will request a (fake) image from the server. The server just have to intercept on this specific request. 2) Fire an ajaxical request and let the server intercept on it. You can use a Filter for this which sets a token in the session scope to inform that the client has JS enabled.

  • How to know whether the Content Type at Library level is Inheriting Parent Content type or not Using Powershell?

    Hi,
    How to know whether the Content Type at Library level is Inheriting Parent Content type or not using Powershell?
    Is there any property for that? Or Do I need to compare the Content type Id's at Site collection level and Library level?
    Any help would be greatly appreciated.
    Thank you,
    AA.

    Hi Ashok,
    For a content type, there is an attribute called Inherits, the value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was
    installed. The child content type does not have any fields that users have added to the parent content type.
    More information, please refer to the link:
    https://msdn.microsoft.com/en-us/library/office/aa544268.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to know whether the current database is using a password file or not?

    How to know whether the current database is using a password file or not?

    The remote_password_file is the parameter that determines if you can use or not a password file. The values this parameter can have are NONE, SHARED, EXCLUSIVE. It is pretty obvious, if it is set to either SHARED or EXCLUSIVE the oracle instance has enabled the access through a password file for the SYSDBA and SYSOPER roles.
    ~ Madrid

  • How do know that the battery is fully charged on ios 7

    How do know that the battery is fully charged on ios 7

    When you turn it on from sleep mode, below the time on the lock screen it says how much charged it is.

  • Urgent :Fetching CRM Activity categories to the master list category table

    Hi all,
       I am working with groupware Integration. I am following "Best Practice" that provided in help.sap.com
    I m  using <b>mySAP CRM 4.0</b> it is in SP-09.
    the problem is in "Fetching CRM Activity categories to the master list category table" for this I am refered
    http://help.sap.com/saphelp_crm40/helpdata/en/56/0efff114e54f3394bde360f3bebb4b/frameset.htm
    in this page says that <b>"GWA_FILL_ACTCAT_TO_MASTERCAT"</b> function module is used for transforing data.
    but if i am checking in my system this function module is not exist.
    Please give the way for solution.
    Thaks in advance.
    Sridhar.
    Message was edited by: Shridhar Deshpande
    Message was edited by: Shridhar Deshpande

    Hi Shridhar,
    I am also working on the same object .
    "GWA_FILL_ACTCAT_TO_MASTERCAT" is not a function module it is a Program so pl. go to SE38 and execute the program.
    Cheers,
    Nilesh
    pl. reward points if this helps out.

  • HT1349 how to know if the product r bought from apple store or digi?

    how to know if the porduct r bought from apple store, digi or maxis?

    It doesn't matter whether it was puchased at an Apple Store or at an Apple-Authorized Retailer.  The warranty coverage and options are the same.
    Use selfsolve.apple.com to determine if that device is still covered under warranty.

  • How to dynamically display the data from a table base on row selection of another table in ADF

    Hi ,
    I have a requirement in ADF. I need to change the data of a table  based on row selection of another Table . Both the table have a Parent Child relationship between them. They have a common attribute say department_id.
                                                                                         For this I created bind variable in view object of employees table and wrote a where clause in the sql query using that bind variable. Then I created method for selection listener of department Table in java bean.
    My method is following
        public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    It is printing the selected value of department id from department table in the log. But it is not able to pass the value to employees view. It is showing the following error in the log
    "Definition DepartmentId of type Variable is not found in EmployeesView1."
    I will be very thankful if someone helps me to solve this errror or is there any other way to achieve the same requirement.
    Thanks
    Nilesh

    Note quite sure why you simply wont create a viewlink for the viewobject the tables are based on..
    The viewlink attribute will be based on the departmentId and it's a simple master detail relationship which automatically uses ppr.
    However, if both tables are on the same page; using your hack about;
    On the underlying viewobject, define a viewcriteria e.g. "listById" and set your bind variable here.
    I would bind table two to a RichTable component:
    RichTable t2;
    public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
                   refreshTable2(pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    private void refreshTable2(Number pallet){
    RichTable x=getT2();
    CollectionModel cm=(CollectionModel)x.getValue();
    JUCtrlHierBinding jcb=(JUCtrlHierBinding)cm.getWrappedData();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(jcb.getName()+"Iterator");
    ViewObject vo =dciter.getViewObject();
    ViewCriteriaManager vcm=vo.getViewCriteriaManager();
    ViewCriteria vc=vcm.getViewCriteria("listById");
    vo.applyViewCriteria(vc);
    vo.setNamedWhereClauseParam("DepartmentId",pallet);
    vo.executeQuery();
    AdfFacesContext.getCurrentInstance().addPartialTarget(getT2());

  • How to repeat the header in af:table with row exceed ?

    Hi All ,
    I am using JDeveloper 11.1.2.0
    My Scenario is I have one <af:table> with 100 rows if I click the print it prints first 50 rows in first page remaining rows print in the second page without column Names.
    I am using header text for create the column Names .Is any other way to create the Column Names dynamically in <af:table> for all the pages?
    CSS have any property to avoid this kind of problem ?
    Thanks ,
    Arun D.
    Edited by: ArunkumarDurairaj on Dec 6, 2012 12:29 PM
    Edited by: ArunkumarDurairaj on Dec 6, 2012 5:22 PM
    Edited by: ArunkumarDurairaj on Dec 6, 2012 5:23 PM

    Hi,
    maybe you could use a report or a export excel

  • How do I browse the whole list of Made with iBooks Author?

    As I remember, before major update of iTunes for mac, I could browse the whole list of "Made with iBooks Author".
    However, I can't find the way to browse the whole list of "Made with iBooks Author".
    Is the way of browsing disappeared, or changed?
    The link of the whole list used to be right above the "New & Coming Soon" in the "Made with iBooks Author" Window.
    After the major update of iTunes for mac, It just disappeared
    I really want to browse the whole list of it so I can buy the books which was made with iBooks Author.

    Pull down View > Show Sidebar.

  • How do you set the font color for a specific entire row inside a JTable?

    How do you set the font color for a specific entire row inside a JTable?
    I want to change the font color for only a couple of rows inside a JTable.
    I've seen some ways to possibly do this with an individual cell.
    Clarification on changing the font color in an individual cell would be helpful too if
    there is no easy way to do this for a row.

    hai,
    Try out with this piece of code.Create your table and assign the renderer to each column in the table.
    CellColorRenderer m_CellColorRenderer = new CellColorRenderer();
    for(int i=0;i<your_JTable.getColumnCount();i++)
    your_JTable.getColumnModel().getColumn(i).setCellRenderer(m_CellColorRenderer);
    class CellColorRenderer extends JLabel implements TableCellRenderer
    CellColorRenderer()     
    setOpaque(true);     
    setHorizontalAlignment(LEFT);
    setVerticalAlignment(CENTER);
    setBackground(Color.white);
    setForeground(Color.black);
    protected void setValue(Object value)
         setText((value == null) ? "" : value.toString());
    public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected, boolean hasFocus, int row,int column)
         if(isSelected == true)
              setForeground(Color.red);
         else
              setForeground(Color.black);
         setValue(value);
         return this;
    regards,
    bala

  • Import the table with 0 rows

    Hi
    I have a problem to import a dump that contains the tables with 0 rows.
    When i exported from ORACLE 11.2 64 bit on SERVER 2008 i noticed that log didn't confirm the tables with 0 rows.
    When i want to import to ORACLE 11.2 64 bit on other SERVER 2008 i have a lot of errors on this tables with 0 rows.
    In the log i get the same tables with 1 row at least, but no one with 0 rows.
    I open my dump in TEXTPAD and i see it contains "CREATE ....." these tables.
    I don't understand why it happens. I used FUll DUMP by SYS, it didn't help.
    This is not first time when i export and import dumps,no errors.
    I'm using command "EXP" and "IMP" and every time it's ok.(IF it's a releavent)
    Why it happens? any solutions for this issue?
    Thanks

    I've found (i guess so) solution to this issue
    here are two links to this new feature that is called deffered segment creation
    The reason for this behavior is 11.2 new feature ‘Deferred Segment Creation‘ – the creation of a table sent is deferred until the first row is inserted.
    As a result, empty tables are not listed in dba_segments and are not exported by exp utility
    http://www.nativeread.com/2010/04/09/11gr2-empty-tables-skipped-by-export-deferred-segment-creation/
    http://antognini.ch/2010/10/deferred-segment-creation-as-of-11-2-0-2/
    And this is i've found in official documentation from oracle
    Beginning in Oracle Database 11g Release 2, when creating a non-partitioned heap-organized table in a locally managed tablespace, table segment creation is deferred until the first row is inserted. In addition, creation of segments is deferred for any LOB columns of the table, any indexes created implicitly as part of table creation, and any indexes subsequently explicitly created on the table.The advantages of this space allocation method are the following:A significant amount of disk space can be saved for applications that create hundreds or thousands of tables upon installation, many of which might never be populated.Application installation time is reduced.There is a small performance penalty when the first row is inserted, because the new segment must be created at that time.
    To enable deferred segment creation, compatibility must be set to '11.2.0' or higher. You can disable deferred segment creation by setting the initialization parameter DEFERRED_SEGMENT_CREATION to FALSE. The new clauses SEGMENT CREATION DEFERRED and SEGMENT CREATION IMMEDIATE are available for the CREATE TABLE statement. These clauses override the setting of the DEFERRED_SEGMENT_CREATION initialization parameter.
    +Note that when you create a table with deferred segment creation (the default), the new table appears in the _TABLES views, but no entry for it appears in the SEGMENTS views until you insert the first row. There is a new SEGMENTCREATED column in _TABLES, _INDEXES, and _LOBS that can be used to verify deferred segment creation+
    Note:
    The original Export utility does not export any table that was created with deferred segment creation and has not had a segment created for it. The most common way for a segment to be created is to store a row into the table, though other operations such as ALTER TABLE ALLOCATE EXTENTS will also create a segment. If a segment does exist for the table and the table is exported, the SEGMENT CREATION DEFERRED clause will not be included in the CREATE TABLE statement that is executed by the original Import utility.

  • How to search records in a standard table with * ?

    Hi everyone,
    Can anyone tell me how to search records in a standard table with * ?
    That is, in screen if user type * abc * for searching the records in which the field MC_STEXT contains 'abc'. What the code should be? How to complete the code below?
      SELECT SINGLE objid FROM p1000  INTO p1000-objid,
      WHERE MC_STEXT = ? .
    Thanks!

    Hi
    There are several way to do that, probably just as some guys wrote the easier way is to use LIKE in WHERE condition and the sign % instead of *:
    V_STRING = '%ABC%'.
    SELECT SINGLE objid FROM p1000 INTO p1000-objid,
    WHERE MC_STEXT LIKE V_STRING.
    U can also use a range (just like select-options):
    RANGES: R_MC FOR P1000-MC_STEXT.
    R_MC-LOW = 'ABC'.
    R_MC(3) = 'ICP'.
    APPEND R_MC.
    SELECT SINGLE objid FROM p1000 INTO p1000-objid,
    WHERE MC_STEXT IN R_MC.
    Max

  • How to insert a table with variable rows in smart form

    Hi all,
    How to insert a table with variable rows in smart form?
    Any help would be appreciated.
    Regards,
    Mahesh.

    Hi,
    Right click the mouse->create->table
    If you want 5 columns, you need to declare 5 cells in one line type of the table
    Click on Table -> Details, then do the following
    Line Type 1 2 3 4 5
    L1 2mm 3mm etc
    Here specify the width of the columns as many as you want..
    then in the header/main area of the table, click create Table Line, Rowtype is L1, automatically 5 cells will come,In each cell create a text element, display the variable to be printed there.

Maybe you are looking for

  • How to configure number of importing mail?

    hi guys,    I'm adding my yahoo mail account into Mac Mail recently, and I have got around 5000 mails in my yahoo account. When I succesffuly added the yahoo account in Mac Mail, the system imports all mails to Mac (starting from very beginining) It

  • Can I have 2 music libraries on the same computer?

    I have an iPod and my wife would like to purchase one aswell. All of my music resides on my desktop. Our tastes in music differ a bit so she would like her own library and I would like mine. If we purchase a new iPod can we have two libraries? Thanks

  • Using Time Capsule as External Drive for iTunes Music Folder in iTunes 9

    First, prior to upgrading to Snow Leopard and iTunes 9, I had my 210 GB of music on a 1TB Time Capsule which I accessed wirelessly through my Macbook Black and I set my path to the "iTunes Music (External) Folder" I created on the Time Capsule as the

  • I am not able to update any of my purcheased applications

    hi, I am trying to update my application but it doesn't go through, it gave me that I am not authorize to do. when i checked the apple ID who purchased those applications it was under my apple ID. how to solve this problem

  • Spilled coffee on iBook

    Unfortunately I spilled coffee on my iBook G4 yesterday morning. I have since let it dry. Using the adapter, i have tried to reset the power manager using the instructions on this site. This has not helped. My iBook makes no sound at all. The adapter