SQL Flow Field Guide

uniqueidentifier (data type)

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

data type uniqueidentifier

What changes

Input
none
Output or change
none

Syntax at a glance

uniqueidentifier

Work example

Represent a globally unique identifier shared across systems or generated outside one database sequence.

Keep the GUID type end to end and avoid converting it to text for joins or storage.

Check your work A GUID is not a secret and its ordering does not represent insertion time.

Practice SQL

Open in SQL Flow
SELECT CAST('6F9619FF-8B86-D011-B42D-00C04FC964FF' AS uniqueidentifier) AS sample_id;

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