I have a multitenant database with something like the following naming structure:
Sch1.Logins => 2 records
Sch2.Logins => 4 Records
Now I want to be able to "Execute as" different users , say when user1 tries to run the query "select * from Logins", the results should be returned from the Sch1.Logins (2 records) and when user2 runs the same query, it would return records from Sch2.Logins.
- How can I do this?
- What settings are required for each user?