PostgreSQL - Roles and SecurityWhat does the GRANT command do in PostgreSQL?AIt gives specific permissions to a user or role.BIt deletes a user from the database.CIt creates a new database.DIt backs up the database.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand the purpose of GRANTThe GRANT command is used to give permissions like SELECT, INSERT, or UPDATE to users or roles.Step 2: Compare with other optionsDeleting users, creating databases, or backing up are done by other commands, not GRANT.Final Answer:It gives specific permissions to a user or role. -> Option AQuick Check:GRANT = give permissions [OK]Quick Trick: GRANT means give rights; REVOKE means take away [OK]Common Mistakes:Confusing GRANT with user creationThinking GRANT deletes dataMixing GRANT with backup commands
Master "Roles and Security" in PostgreSQL9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PostgreSQL Quizzes Indexing Strategies - GIN index for arrays and JSONB - Quiz 1easy Indexing Strategies - GIN index for arrays and JSONB - Quiz 10hard PL/pgSQL Fundamentals - DO blocks for anonymous code - Quiz 7medium PL/pgSQL Fundamentals - Variable declaration and assignment - Quiz 2easy PL/pgSQL Fundamentals - Variable declaration and assignment - Quiz 9hard PL/pgSQL Fundamentals - RAISE for notices and exceptions - Quiz 14medium PL/pgSQL Fundamentals - IF-ELSIF-ELSE control flow - Quiz 12easy Performance Tuning - Sequential scan vs index scan - Quiz 14medium Roles and Security - Password authentication methods - Quiz 9hard Transactions and Concurrency - Serializable isolation - Quiz 1easy