need help to construct query

Posted by Learner on Stack Overflow See other posts from Stack Overflow or by Learner
Published on 2012-09-03T08:25:22Z Indexed on 2012/09/03 9:38 UTC
Read the original article Hit count: 175

Filed under:
|

i have the following result and i would like to construct the select query from the following result in java,

Please help me how to go about ,

 tablename       columnname           size  order
    employee        name               25    1
    employee        sex                25    2
    employee        contactNumber      50    3
    employee        salary             25    4
    address         street             25    5
    address         country            25    6

from this i would like to construct query like

select 
        T1.name,
        T1.sex,T1.contactNumber,
        T1.salaryT2.street,
        T2.contry 
from tablename1[employee] T1,
     tablename2[address] T2

how to construt the above query in java, here table name can be N also the columname can be also N.

Please help me to achieve the above.

Thanks and Regards

© Stack Overflow or respective owner

Related posts about java

Related posts about mysql