I need to distribute user access to database resources. I think that this should be done using schemes. In the official documentation when creating a scheme, a table is also created. I need to give access to already created tables. How can this be done? And generally it is possible to provide access to the table with restrictions? That is, create a schema with a condition (WHERE), according to which access to the resources of the already created table will be provided.

    1 answer 1

    The easiest way is to create database roles, provide the necessary access to the roles and assign the necessary roles to each user.

    For this there is a series of system procedures and commands: CREATE ROLE (sp_addrole) - add the role sp_addrolemember - add the role of the login name

    Well, the usual instructions DCL - GRANT, REVOKE, DENY