suser_id  syb_quit

Chapter 2: Transact-SQL Functions

suser_name

Description

Returns the name of the current server user or the user whose server ID is specified.

Syntax

suser_name([server_user_id])

Parameters

server_user_id

is an Adaptive Server user ID.

Examples

Example 1

select suser_name()
------------------------------
sa

Example 2

select suser_name(4)
------------------------------
margaret

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute suser_name.

See also

Functions suser_id, user_name





Copyright © 2005. Sybase Inc. All rights reserved. syb_quit

View this book as PDF