how to get the column name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaleeswaran
    New Member
    • Mar 2007
    • 132

    how to get the column name

    hi!
    i want to display the database fields with the respective value...
    like ,
    my table is:pay_allow_de tails.
    from that i have column name like :h_house_rent,h ill_allow,risk_ allow.
    so i should display the value with the respective column name in jsp.
    is there any query there for fetching the column name ?..
    thank you,
    kaleeswaran
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    You can use the SHOW COLUMNS statement to display column information:
    [code=mysql]
    SHOW COLUMNS FROM myTbl
    [/code]

    Comment

    Working...