April 2026
Beginner
493 pages
23h 2m
English
In this section, we’ll get hands-on with DCL and see how to grant privileges to users—either directly or via roles, as we’ve learned to do, conceptually.
Before granting privileges to users, you need some sample users, right? Execute Listing 8.12 to create a few users. You can create different accounts if you like.
CREATE USER sophia_reed WITH PASSWORD 'securePass123';CREATE USER liam_harper WITH PASSWORD 'password321';CREATE USER john_doe WITH PASSWORD 'thompson2024';
Listing 8.12 Creation of Sample Users
Now, let’s start with a simple requirement of letting john_doe read entries from the finance_transaction table. Jumping to the practical code sample first, the DCL statement to ...
Read now
Unlock full access