How to define a current user?
问题 Is it possible to define a current user? I found a stored procedure 'sp_mgGetConnectedUsers'. It returns a result set with the only unique field 'Address'. How could I associate an executing query with such 'Address'. Please advice. Note: As far as I understand, another way to get the current user is to set a unique application Id for each connection, but I don't like this way much. 回答1: If using a data dictionary you can use the user scalar function: select user() from system.iota; and