User that executes a sql statement

Database

User that executes a sql statement

Hi, I'd like to know if i can capture the user that executes a query.

I'm using a variable to capture the error on a statement (:SQLCode), but I need to know the user that has excecuted the query. Maybe the user is stored in a similar way.

Thanks.

2 REPLIES
Senior Apprentice

Re: User that executes a sql statement

The built-in function USER returns the current user.

Dieter

Re: User that executes a sql statement

Thanks! That's what I was looking for.