SQL Flow Field Guide

GET CONVERSATION GROUP

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

picks the next conversation group

What changes

Input
a queue
Output or change
conversation group id variable (locks the group)

Syntax at a glance

[ WAITFOR ( ] GET CONVERSATION GROUP @conversation_group_id FROM <queue> [ ) ] [ , TIMEOUT timeout ] [ ; ]

Work example

A queue reader needs to lock and process one conversation group at a time.

Trace the returned group handle through the transaction and message-processing loop.

Check your work The reader processes messages for one group and releases its lock when the transaction ends.

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