Connecting Tech Pros Worldwide Forums | Help | Site Map

how to get the column name

kaleeswaran's Avatar
Familiar Sight
 
Join Date: Mar 2007
Location: comibatore
Posts: 132
#1: Nov 16 '07
hi!
i want to display the database fields with the respective value...
like ,
my table is:pay_allow_details.
from that i have column name like :h_house_rent,hill_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's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,752
#2: Nov 16 '07

re: how to get the column name


Hi.

You can use the SHOW COLUMNS statement to display column information:
Expand|Select|Wrap|Line Numbers
  1. SHOW COLUMNS FROM myTbl
  2.  
Reply