If its gonna be some static info like user_details which can looked up using an user_id then i'd go for a static table like edv_user. Whereas in the case of dynamic info which involves the passing of data for every transaction, you might have to use the passed parameters only.
Then regarding the user_name to be stored in the table (which you were talking abt in the earlier part of your post), if its wrt to the application (front-end) user_name then you might have to pass it to the stored proc as a parameter. Else, if its the DB user_name under whose scope the queries are being executed, you may always use SUSER_NAME() that gives the current user name.
SELECT SUSER_NAME()
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>
No comments:
Post a Comment