Solved

how to create a view for a table which is exist in another database

Posted on 2016-09-29
2
19 Views
Last Modified: 2016-09-30
Hi Experts,

I have a two databases
Test1
Test2

Test1 database have table called items


I want this table data in Test2 database
I want to create a view for this table and i have to access the data via view in Test2 database;

Can some one suggest me how to do a view creation
how to get the data from Test1 database items table to Test2 database xxx view

please find the table data  in the attachment.
test.PNG
0
Comment
Question by:srikotesh
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
you can always do this:
select * from otherdatabase.tablename

Open in new window


and this can be done in a view also
use test1

create view test2_Items_view
as 
select * from test2.items

Open in new window

0
 
LVL 1

Author Comment

by:srikotesh
Comment Utility
CREATE VIEW `D2`.`example` AS SELECT * FROM `D1`.`T1`;

http://stackoverflow.com/questions/10694601/creating-view-across-different-databases
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now