Very helpful, but What if the user know all that three USER ''userHR", "userFin" and "userCEO"? a user can show all the records by using Execute as USER.
tankyou very usefull but when i grant to user first user is ok but second and so on dont get gran and get me an error: User does not have permission to perform this action.
You may be trying to create a new user after switching the context to previously created user. Try using REVERT; statement before creating another user.
Awsomely clear. Could you please enlighten me above row and Column level security what else you can use as security solution in business ?
what is "select 1 as result in the table valued function" exactly doing ?
"SELECT 1" is just used to make sure the query returns at least 1 row. If there is no row returned then the user is not allowed to see that data.
Very helpful, but What if the user know all that three USER ''userHR", "userFin" and "userCEO"? a user can show all the records by using Execute as USER.
The normal user can't use "EXECUTE as USER" until he has admin rights :)
Interesting tech tutorials.
How can we achieve Row Level Security with multiple users for one row
Very usefull! thanks!
tankyou very usefull
but when i grant to user first user is ok but second and so on dont get gran and get me an error: User does not have permission to perform this action.
You may be trying to create a new user after switching the context to previously created user. Try using REVERT; statement before creating another user.