SQL Flow Field Guide

OPENQUERY

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

remote execution

What changes

Input
pass-through query text on a linked server
Output or change
remote rowset (can also be an INSERT/UPDATE/DELETE target)

Syntax at a glance

OPENQUERY ( linked_server ,'query' )

Work example

A report must read a defined pass-through query from a configured linked server.

Review the remote query, provider, credentials, and data boundary with the owner. Use a non-sensitive test source.

Check your work OPENQUERY. The remote rowset has the expected columns and the local plan shows the intended remote work.

Open Microsoft Learn for full syntax, permissions, and details for your version.