Select from table belong to another database

  • Hi

    I'm working with SQL2012 Express, and I have created 2 database, each database has different users login. Like this:

    User1 can login in : DatabaseA

    User2 can login in : DatabaseB

    DatabaseA has TableA and DatabseB has TableB , both table has same structure.

    When I am connected to DatabaseA , I need to update TableB

    How do I do it?

    Thanks

  • Add User1 as a database user on database B and grant them update rights on the table in question, then just UPDATE DatabaseB.dbo.TableB ....

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks Gila

    But now i have a problem, i created the dabases in Sql 2012 server provider, and the provide tell me :

    "Dear customer :"

    "we support multiple users per database. But you cannot use one user to access more than one database. "

    What can i do?

  • Tell then they don't have a clue what they're talking about.

    Unless this is a SQL Azure database, a single user absolutely can access multiple databases.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply