ComeçarComece de graça

Rescinding group membership

The technology team at the SBA would like to be more proactive in assigning database access by group. Each user account must belong to at least one group. All project managers will be members of a project_management group. Therefore, Kim Lopez, should be added to this account and removed from the dev_team group. This exercise will allow you to manage group membership for these teams.

Este exercício faz parte do curso

Creating PostgreSQL Databases

Ver curso

Instruções do exercício

  • Create a new group named project_management.
  • Grant the project_management group the SELECT privilege on the loan table.
  • Add user klopez to the project_management group.
  • Remove user klopez from the dev_team group.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

-- Create the project_management group
___ ___ ___;

-- Grant project_management SELECT privilege
GRANT ___ ON ___ TO ___;

-- Add Kim's user to project_management group
___ ___ ___ ADD USER ___;

-- Remove Kim's user from dev_team group
REVOKE ___ FROM ___;
Editar e executar o código