Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie SQL Question
Laurenz Albe schrieb:
> Ana C. Dent <anacedent_at_hotmail.com> wrote:
>>> Let's say there is a table called "table_map", which has two columns, >>> "tablename" and "sql_mapping". If I say: >>> " select tablename from table_map where sql_mapping is not null.", I >>> will get a list of tables that exist in the same database. >>> >>> Besides, if I say: "select count(*) from <table name>", I will get the >>> rows in one table. >>> >>> So my Question is is there a way I can combine both SQLs into one, >>> that returns me the counts of each table, and the table_names from the >>> "table_map". >> sure, go ahead & do it.
Just one remark - it can be done in single sql query as demonstrated here http://laurentschneider.com/wordpress/2007/04/how-do-i-store-the-counts-of-all-tables.html I don't think however, it can have practical value, rather academical, nevertheless, the approach used by Laurent looks very nice.
Best regards
Maxim Received on Thu Jul 26 2007 - 03:48:55 CDT
![]() |
![]() |