top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is OpenQuery in SQl server

+6 votes
759 views
What is OpenQuery in SQl server
posted Dec 19, 2013 by Neeraj Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes
 
Best answer

Executes the specified pass-through query on the specified linked server. This server is an OLE DB data source. 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. This is subject to the capabilities of the OLE DB provider. Although the query may return multiple result sets, OPENQUERY returns only the first one.

answer Dec 23, 2013 by Prachi Agarwal
0 votes

The OPENQUERY command is used to initiate an ad-hoc distributed query using a linked-server. It is initiated by specifying OPENQUERY as the table name in the from clause. Essentially, it opens a linked server, then executes a query as if executing from that server.

answer Jan 13, 2014 by Atul Mishra
...