Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I specify a join for 2 databases?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00271651
Message ID:
00271786
Vues:
28
SELECT db1!transaction.item, db2!inventory.description JOIN db1!transaction.item=db2!inventory.item FROM db1!transaction ...

SELECT transaction.item, inventory.description
FROM db1..transaction transaction, db2..inventory.item inventory
where transaction.item=inventory.item

If the databases are in different servers/boxes you will not be able to run this query
db1..transaction can also be written as db1.dbo.transaction
db1..transaction ->transaction is the alias name
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform