mysql - Replace row names in an SQL statement with informations from an other table -


i have mysql table named data name of column field_id_# (where # number 1 129). have table named fields columns field_id (with # of corresponding field in table data - means number # not field_id_#) field_name , field_label. run query this:

select data.field_id_1 fields.field_label1,        data.field_id_2 fields.field_label2        [...] 

i don't know if possible or not , if so, how it. can me that? help.

please use meaningful names directly column definitions! selects , program parts access database readable. they're surely not readable naming convention describe here.

for immediate solution can build sql statement dynamically/programmatically, or generate views columnnames replaced meaningful ones.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -