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

SQL92 – Compliance level: Transact-SQL extension.

Permissions

Any user can execute suser_id.

See also

Functions suser_name, user_id