MySQL Forums
Forum List  »  Perl

How to get column name according to its value
Posted by: Julio Diaz
Date: September 13, 2010 10:50AM

Hi.

Which function/command would give me the name of a column that contains a given value?

Example If I have table variables

ID | VARIABLENAME1 | VARIABLENAME2 |
1 | Density | Temperature |



I would like to get the name of the column whose value is 'Density'. In this case the result would be VARIABLENAME1.
Thanks

Options: ReplyQuote


Subject
Written By
Posted
How to get column name according to its value
September 13, 2010 10:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.