I want to query a database for a column name to find the table without knowing the table name (there are a huge number of tables)
I am working with a huge database at the moment and trying to find where, based on CFML code and the URL of the problematic page, a website is retrieving information from. I am new to ColdFusion however I can see that the URL contains a few ID references with column names. Some I have been able to find easily and others, I have no idea as the column names are quite vague e.g. 'NTASKID'.
My plan is to try to query the database using the column name but Google has presented me queries which require knowing the table name which I do not have. I guess those examples may have been more useful for denormalised tables(?).
If someone knows such a query it would be great. Additionally, could someone please comment on whether I am going down the right avenue of investigation here?
The query that worked was
SELECT * FROM ALL_TAB_COLUMNS
WHERE COLUMN_NAME LIKE '%TASK%'
AND owner = 'database_name';
It was the 'owner' part I did not previously know about. Everyone who answered certainly opened avenues for further Googling.
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With