employees with columns id, name, and salary, user alice has only SELECT permission on this table. What will be the result of the query SELECT * FROM employees; when run by alice?SELECT * FROM employees;
With SELECT permission on the table, the user can read all rows and columns. No error occurs, and no columns are hidden by default.
bob tries to insert a new row into the departments table but does not have INSERT permission on it. What happens when bob runs INSERT INTO departments (id, name) VALUES (5, 'Marketing');?INSERT INTO departments (id, name) VALUES (5, 'Marketing');
Without INSERT permission, the database denies the operation and raises a permission error.
projects table to user carol?The correct syntax to grant UPDATE permission on a table is GRANT UPDATE ON TABLE table_name TO user;. Option A omits the keyword TABLE, which is optional in PostgreSQL.
dave tries to delete rows from the tasks table but gets a permission denied error. The DBA confirms that dave has DELETE permission on the table. What could be the reason for the error?If the table has DELETE triggers, the user needs permission to execute those triggers. Lacking TRIGGER permission can cause a permission denied error despite having DELETE permission.
analyst has SELECT permission on the sales table. Role intern is a member of analyst but has no direct permissions on sales. What permissions does intern have on the sales table?In PostgreSQL, roles inherit permissions from roles they are members of. Since intern is a member of analyst, it inherits SELECT permission on sales.
