Results 1 to 2 of 2

Thread: Column Search

  1. #1
    Join Date
    May 2005
    Location
    RESTON, VA
    Posts
    3

    Post Unanswered: Column Search

    I'm trying to search for a particular column to see whether it exist in one and only one table in every database except master, b/c we don't store any working tables in master.
    I assume we would use syscolumns, sysdatabases, and sysobjects.

    example, looking for column "over_time" which could be in one and only one table (Time_Sheet) in each of the databases (ENG_LABOR, ADMIN_LABOR) but I would like to use the system tables.

    Also, after your executed use DATABASE char() go
    how do you know which database your currently in? is there a show user like in oracle??

  2. #2
    Join Date
    Sep 2005
    Location
    France, Paris
    Posts
    34
    Hello,

    Quote Originally Posted by lawill5
    Also, after your executed use DATABASE char() go
    how do you know which database your currently in? is there a show user like in oracle??
    select db_name()
    go
    Regards.

Posting Permissions

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