0

I have 2 databases D1 and D2 with tables T1 and T2 respectively.

CREATE VIEW V1 
AS
    SELECT
        T2Column1, T2Column2
    FROM            
        D2.T2
    WHERE        
        (T2column3 = 'condition')

This code creates a view in SQL Server. I want the corresponding Oracle code.

7
  • different database or schema ? if database then you have to use dblink Commented Jan 8, 2016 at 9:23
  • D1 and D2 are Oracle Data Base. Commented Jan 8, 2016 at 9:35
  • then you should create a DB linkto access the other database. if you didnt know how to do that ill post an answer after a bit Commented Jan 8, 2016 at 9:48
  • pls give me how to do that.I dont know DB link access in oracle Commented Jan 8, 2016 at 10:20
  • hi man do you still need help in this ? Commented Jan 9, 2016 at 20:43

1 Answer 1

1

you should create a dblink ( reade more about it)

create public database link dblink test
  connect to SCHEMA_NAME
  using 'usb-o12-c1.comp.local:1000/servername'

in using go to your tnsname in your oracle folder C:\oracle\product\10\c\network\admin and take the require info 1000 represent to your port number and replace your servername

then try like this

select * from test@tab1

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.