Here are two cases I’ve run into recently:
- Querying the set of tables for those that have more than 0 rows but less than 50 rows.
- Querying all tables to find which has a column named a certain value.
Are either of these possible? If so, how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To get a table with a specific column name:
An estimate of the number of rows in a table can be found:
This will be close if your statistics are up to date. If not, you need to create a
pl/sqlprocess to loop through the tables and perform acount(*)on them.EDIT: Have found an Ask Tom article on the number of rows query: Finding the number of rows in each table by a single sql.