Results 1 to 5 of 5

Thread: Columns names

  1. #1
    Join Date
    Feb 2004
    Posts
    26

    Red face Unanswered: Columns names

    I need a querry to get all columns names.

    thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    All possible column names, or just the ones in your database?

    Check out INFORMATION_SCHEMA.COLUMNS to see if that will help.

    -PatP

  3. #3
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185
    Select query against the Syscolumns table should work for you.

  4. #4
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106
    Join Sysobjects to Syscolumns (ID) to get the table name corresponding each column.

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Just for what it is worth, the information_schema.columns view does exactly what the user wants, it is documented, works on many database engine platforms, and removes the need to reference system tables.

    -PatP

Posting Permissions

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