SQL Flow Field Guide

CREATE LOGIN

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

defines a login

What changes

Input
catalog
Output or change
security catalog: login

Syntax at a glance

CREATE LOGIN login_name { WITH <option_list1> | FROM <sources> }

Work example

A new server principal needs a reviewed authentication path.

Choose the approved identity provider and default database, then record role membership without including a password.

Check your work The login maps to the intended identity and starts with no unneeded server permissions.

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