Re: Dynamic sql query

From: hrishy <hrishys_at_yahoo.co.uk>
Date: 22 Jul 2003 23:18:56 -0700
Message-ID: <4ef2a838.0307222037.64cb4e6c_at_posting.google.com>


Hi Prashant

Hope your using the CBO to run dbms_stats etc..if you are using RBO then the pl/sql solution is the best bet.

regards
Hrishy

P.S:Prashant by the way how r ya..its a long time that we met

danielroy10junk_at_hotmail.com (Daniel Roy) wrote in message news:<3722db.0307221135.6d1267c9_at_posting.google.com>...
> To find out the number of rows in a table, use DBMS_STATS
> (.GATHER_SCHEMA_STATS or .GET_TABLE_STATS) to analyze your tables (or
> your whole schema), and you can afterwards use column NUM_ROWS of
> table ALL_TABLES. Depending on which optimizer mode you use, you might
> want to delete these statistics afterwards (with
> DBMS_STATS.DELETE_SCHEMA_STATS or DBMS_STATS.DELETE_TABLE_STATS).
>
> Daniel
>
> > Can u help me out on a sql query:
> > Requirement is i need to print
> > table_name , columns_inside_table , rows_in_this_table of a particular
> > schema..
> > I have got 1 solution from using PLSQL , but i want to get the desired
> > output with sql qurey only.
> > I have partial solution of this:
> >
> > "select table_name "Table Name" , count(*) "Columns" from
> > user_col_comments
> > /*((or v can also use user_tab_columns))*/ group by table_name;
> >
> > This is giving me table_name and number of columns in this table but
> > not rows..
> >
> > Can U guys help me on it..
> > Thanx & regs in advance..
> > Prashant Khanna.
Received on Wed Jul 23 2003 - 08:18:56 CEST

Original text of this message