Access tables in different DB on same server

On the same MS SQL 2005 server, I want to access tables in a different DB. The DB my code is in, for example, is Prothera. The other DB is MOM. So my stored procs and table value functions that I'm using are in Prothera. So I'm accessing tables in Prothera and in MOM.  thx
protheraAsked:
Who is Participating?
 
Patrick MatthewsConnect With a Mentor Commented:
Just fully qualify your table references, e.g.,SELECT *FROM DB_Name.dbo.Table_Name
0
 
protheraAuthor Commented:
Excellent! I thought this would be easy for you experts! Thank-you!
0
All Courses

From novice to tech pro — start learning today.