Executes the specified pass-through query on the specified linked server.
OPENQUERY can be referenced in the FROM clause of a query as if it were a table name.
OPENQUERY can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement.
Although the query may return multiple result sets, OPENQUERY returns only the first one.
Syntax
OPENQUERY ( linked_server ,'query' )
Executing a SELECT pass-through query
The following example uses a pass-through
SELECT
query to select the row inserted in example C.
SQL
SELECT * FROM OPENQUERY (OracleSvr, 'SELECT name FROM joe.titles WHERE name = ''NewTitle''');