How to fetch data from two table from two database in sql server?


Hi

We have created  two databases i.e Test and Test1. In Test database i have kept tblEmp and In Test1 database  i have kept tblDept. I have fetch this 2 tables using a single select query. Then we can write the query like this

Select * from tblEmp t1 left outer join Test1..tblDept t2 on t1.EmpId = t2.DeptId


Advertisement

3 thoughts on “How to fetch data from two table from two database in sql server?

  1. oliviadecke June 12, 2014 / 12:31 pm

    It’s аmazing in support of me to havе a websіte, whіch is helpful for my knowledge.
    thanks admin

  2. earlpersinger October 8, 2014 / 2:59 am

    Hey! Quick question that’s entirely off topic. Do you know how
    to make your site mobile friendly? My site looks weird when browsing from my iphone.
    I’m trying to find a template or plugin that might be able to fix this
    problem. If you have any recommendations, please share. Thank you!

    • Chandra Dev October 10, 2014 / 2:33 pm

      Hi

      You change the bootstrap enable theme.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.