Results 1 to 4 of 4

Thread: Newbie Query Question.

  1. #1
    Joe Guest

    Newbie Query Question.

    I am a newbie to sql queries. IS there a way to get a listing of all the tables and each column in the tables? Thanks
    Joe

  2. #2
    Ray Miao Guest

    Newbie Query Question. (reply)

    Try 'select * from INFORMATION_SCHEMA.columns'.


    ------------
    Joe at 12/5/00 4:00:47 PM

    I am a newbie to sql queries. IS there a way to get a listing of all the tables and each column in the tables? Thanks
    Joe

  3. #3
    Guest

    Newbie Query Question. (reply)

    I put in SELECT * FROM INFORMATION_SCHEMA.columns but all it returned was for example when I run it on the northwind database all I get is

    TABLE_CATALOG
    --------------------------
    Northwind
    Northwind
    etc..

    Did I put it in wrong?

    Thanks



    ------------
    Ray Miao at 12/5/00 4:27:40 PM

    Try 'select * from INFORMATION_SCHEMA.columns'.


    ------------
    Joe at 12/5/00 4:00:47 PM

    I am a newbie to sql queries. IS there a way to get a listing of all the tables and each column in the tables? Thanks
    Joe

  4. #4
    jen Guest

    Newbie Query Question. (reply)

    try this
    select a.name tablename,b.name colname from sysobjects a ,syscolumns b
    where a.type='U'
    and a.id=b.id

    jen

    ------------
    Joe at 12/5/00 4:00:47 PM

    I am a newbie to sql queries. IS there a way to get a listing of all the tables and each column in the tables? Thanks
    Joe

Posting Permissions

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