SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Retrieve row table COLUMN_NAME and table COLUMN_COMMENT

    Hello forums,

    I was wondering if it's possible to query a row together with the COLUMN_NAME and COLUMN_NAME information schema

    I have this:

    Code:
    SELECT COLUMN_NAME, COLUMN_COMMENT
      FROM INFORMATION_SCHEMA.COLUMNS
      WHERE table_name = 'my_table'
      AND table_schema = 'my_databse'
    this returns the column name and column comment however I also want to retrieve the records in the table. Is this even possible?

    Thanks
    Don't Panic

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by stonedeft View Post
    ... however I also want to retrieve the records in the table. Is this even possible?
    not in the same query, no
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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