Summary

Security is an often-overlooked topic that can cause many problems if not properly thought out and administered. Fortunately, SQL provides several useful commands for implementing security on a database.

Users are originally created using the CREATE USER command, which sets up a username and password for the user. After the user account has been set up, this user must be assigned to a role in order to accomplish any work.

The GRANT command gives a permission or privilege to a user. The REVOKE command can take that permission or privilege away from the user. The two types of privileges are system privileges and object privileges. The system privileges should be monitored closely and should not be granted to inexperienced users. Giving ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.