suser_id

Description

Returns the server user’s ID number from the syslogins table.

Syntax

suser_id([server_user_name])

Parameters

server_user_name

is an Adaptive Server login name.

Examples

Example 1

select suser_id()
------ 
     1

Example 2

select suser_id("margaret")
------ 
     5

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute suser_id.

See also

Documentation Transact-SQL Users Guide

Functions suser_name, user_id