SQL Flow Field Guide

Security functions (overview)

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

none (documentation, rules or examples)

What changes

Input
none
Output or change
none

Syntax at a glance

n/a (reference page)

Work example

Inspect the current SQL Server login, database user, role, or execution context for diagnostics.

Use database permissions for authorization decisions and avoid treating a displayed identity string as proof of access.

Check your work Execution context and contained database users can make login and user functions return different names.

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