USER_ID function [System]

Returns the numeric user ID for the specified user name.

Syntax
USER_ID( [ user-name ] )
Parameters
  • user-name   The user name for the user ID you are searching for.

Remarks

If you do not specify user-name, the ID of the current user is returned.

See also
Standards and compatibility
  • SQL/2003   Transact-SQL extension.

Example

The following statement returns the GROUPO user ID.

SELECT USER_ID( 'GROUPO' );