Hi,
In genral database what is the system function to get the current user's user id?
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Arjun PanwarPosted Jan 3, 2012, 2:17 PM
Chintan RathodPosted Jan 3, 2012, 11:38 AM
When connected to SQL Server 2000, use:
Syntax
USER_ID ( [ 'user' ] )
Arguments
'user'
Is the username to be used. user is nchar. If a char value is specified, it is implicitly converted to nchar.
Return Types
smallint
Remarks
When user is omitted, the current user is assumed. Parentheses are required.
USER_ID can be used in the select list, in the WHERE clause, and anywhere an expression is allowed.
Examples
This example returns the identification number for user "Chintan".
Satyapriya NayakPosted Jan 3, 2012, 11:06 AM