query on multiple database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gld88
    New Member
    • Aug 2008
    • 2

    query on multiple database

    in two database ,i want to select some columns of three tables each of two databases where column name is same
  • BHTanna
    New Member
    • Aug 2008
    • 31

    #2
    All databases on same server?

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      use the fullname of the object

      Code:
      SELECT ....FROM db.owner.yourtable
      .....LEFT JOIN anotherdb.owner.yourtable
      If they're on a different server, you might need to link those server first.

      -- CK

      Comment

      • gld88
        New Member
        • Aug 2008
        • 2

        #4
        Originally posted by BHTanna
        All databases on same server?

        yes all database in same server , are you give me some solution
        thanks

        Comment

        Working...