I am looking on how to retrieve a table name that is currently active so that I can store that table name into a variable and then use it in a query that will need to fetch the tablename the data is located in. I have looked on Stack and Google and cannot find a simple solution to this. I wish I could provide an example of what I am already working with but the truth is that I have not found anything of use that will help me do this simple task.
I want to select table name and store, that is all. Sounds simple enough, I hope I don't get down votes for this one but I really need to find an answer to this even if points are lost.
To clarify: I want to find a way to use the same script for different table names. We have different categories of tables. I would like the query to search certain columns on a specific tables based on the current table that is being accessed. We have table 1 and table 2 with the some columns that are the same name but only table 1 is being accessed at the moment. If administrators want to make a change to image in a table it needs to be done in the table that is currently accessed so that I do not duplicate my code just to accommodate different table names.