|
View previous topic :: View next topic
|
| Author |
Message |
Himanshu Khatri
New User

Joined: 11 Jun 2007 Posts: 15 Location: Pune
|
|
|
|
Hi,
I have to display only column names of a table in a single row.
I searched in SYSIBM tables but not able to find it.
Can anybody send me query for this in DB2???
TIA
Thanx & Regards,
Himanshu |
|
| Back to top |
|
 |
bosalting
New User
Joined: 02 Jun 2007 Posts: 4 Location: Philippines
|
|
|
|
I usually deal with such need by issuing a SELECT * on the table
in QMF. Then pressing F9 to view the report which gives a list of all column.
Hope this can help. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
| Back to top |
|
 |
Prajesh_v_p
Active User

Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Dick,
Seems like he need to get the columns name in a single row!
Thanks,
Prajesh |
|
| Back to top |
|
 |
RamsIBM
New User

Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
select * from <table name> where 1=2
We can give any wrong logical condition in where clause... |
|
| Back to top |
|
 |
Himanshu Khatri
New User

Joined: 11 Jun 2007 Posts: 15 Location: Pune
|
|
|
|
Thanks guys  |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
| Quote: |
select * from <table name> where 1=2
We can give any wrong logical condition in where clause... |
Good one - better than a fancy "trick"
d |
|
| Back to top |
|
 |
|
|