How to check all columns existing in a table?
829138Jan 6 2011 — edited Jan 7 2011Hello.
I'm writing a function that returns average value of every numeric column existing in a database.
I have a general idea how to do it, but I need just one more thing, look at the expamle:
select table_name from user_tables where rownum=1
this allows me to select names of all tables, and then I can access them 1 by 1...
But now i have a little problem - how to access all the atributes in selected table in this way?
Oh, and I have a problem with this rownum... For example it works for 1 (shows 1st row - name of first table) but does not for 2, or greater number :(.
And expresions like rownum < 5 work, but rownum > 3 not :/. What may be the reason?
Thank you for help!
Regards.