Recently, I am getting involved a lot on database related tasks. My previous jobs mostly deal with gdbm and MySQL. This "new" job makes me deal a lot with Oracle database and cdb. :) I actually never bother to get to know the special tables in the database. I need to do a tiny query on production server to get to know the number of records of some of the tables today. Imagine a database with thousands of tables. I can't be doing select count(*) from <table name> for all of the table names. In addition, I don't know the list of the tables of interest but only the pattern of the table names. Luckily, found this post : http://stackoverflow.com/questions/6703444/counting-no-of-records-from-multiple-tables-oracle-db There is a special table host the tables information, namely ALL_TABLES . To get the list of tables in the database and number of rows for each table, run this sql statement in sqlplus. select TABLE_NAME, NUM_ROWS FROM ALL_TABLES; For MyS...
Previously known as jcrys26's kdb. A learning dump and sharing place.