CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: How to get description of a column

  1. #1
    Join Date
    Nov 2004
    Posts
    187

    How to get description of a column

    I have a table and I have columns there with some descriptions
    How can I get the descriptions of the columns in a query? Is it possible?

    TABLE
    ====================
    FIELD DESCRIPTION
    -------------------------------------
    ID
    NAME Name of employee
    STAD Street Address
    DTB Date of Birth

    Could I bring the metadata? How?

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: How to get description of a column

    What kind of database are you working with? And what server-side language are you using? Since your questions have been PHP in the past, I will assume it's PHP.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Nov 2004
    Posts
    187

    Re: How to get description of a column

    Im using MySQL (MYISAM) and php.

  4. #4
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: How to get description of a column

    I'm assuming you're talking about comments since MySQL doesn't have descriptions.

    Code:
    SHOW FULL COLUMNS FROM database.table
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Nov 2004
    Posts
    187

    Re: How to get description of a column

    Yes. Thats right. Comments.

    This works
    Code:
    SHOW FULL COLUMNS FROM database.table
    Is there a way to just get the comments?
    SHOW comments FROM database.table

    Thanks

  6. #6
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: How to get description of a column

    Not to my knowledge. But, what does it matter? The query would only change by nanoseconds.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)