how to get column names if it has specific value.
I need this sentence below in the correct syntax.
select all_column_names from mytable where any.column_value=5;
that's an ugly query you are trying to run. Advise you figure out what is really being asked for and why, then figure out what subset of tables/columns really would apply, and search those only. Otherwise you're basically going to have to search through every column in every table in the database to find your value, when most of them won't even matter for what you're looking for.
If the user can't give you better requirements than that, odds are you can ignore it completely, because they don't know what they heck they want.
19 People are following this question.