Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

retrieve the fields name of a table

Guest
Aug 27, 2009 Aug 27, 2009

HI,

I need to write a loop to get the name of each fields in a table. I nedd something like

for each field.fieldname do something

thanks,

Mandana

TOPICS
Database access
888
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 27, 2009 Aug 27, 2009

select * from yourtable where 1 = 2

The resulting columnlist will give you all the field names.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 27, 2009 Aug 27, 2009

A better approach might be to use <cfdbinfo>.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 28, 2009 Aug 28, 2009
LATEST

Thanks. It worked for me.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources