Skip to main content

What are access privileges (privileges)?

Privileges are permissions that define what a user can do in a database.

They're how an administrator manages security and separates access.

Examples of the main privileges

  • SELECT, read data from a table;
  • INSERT, add new rows;
  • UPDATE, change existing data;
  • DELETE, remove rows;
  • CREATE, create tables, views, functions, and so on;
  • DROP, remove objects;
  • ALTER, change an object's structure;
  • EXECUTE, run functions or procedures.

Example

sql
GRANT SELECT, INSERT ON employees TO analyst;

Now the analyst user can read and add data to the employees table.

Privileges can also be revoked:

sql
REVOKE INSERT ON employees FROM analyst;

So privileges are rules that tell the DBMS which actions a specific user is allowed to perform.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.