3 views
23 Jan 2026
You want user support_viewer to see only customer_id and name from Customers, not email/phone. Grant SELECT on only these columns (column-level privilege)....
2 views
23 Jan 2026
Create a user analyst and grant only SELECT on Orders table....
3 views
23 Jan 2026
User intern was given INSERT on Customers by mistake. Remove it....
2 views
23 Jan 2026
Create a role report_reader with SELECT on Customers and Orders, then grant the role to user rohit....
2 views
23 Jan 2026
Procedure sp_monthly_sales exists. Give user accountant permission to execute it....
2 views
23 Jan 2026
User analyst already exists. Write the SQL to check what privileges/grants are currently given to this user....
2 views
23 Jan 2026
Create user readonly_user, then give only SELECT access on all tables under schema sales_db. Keep it least-privilege (no insert/update/delete)....
2 views
23 Jan 2026
Give team_lead SELECT on Employees with grant option, then explain the risk in one line inside description....
2 views
23 Jan 2026
User rohit should no longer have role report_reader. Write the revoke statement....
2 views
23 Jan 2026
User data_entry should be able to SELECT and INSERT into Orders but cannot UPDATE or DELETE. Write grants....
2 views
23 Jan 2026
Create a view v_public_customers that exposes only customer_id and name. Then grant SELECT on the view to public_user without granting base table access....
2 views
23 Jan 2026
You want to allow SELECT on Payroll only through a view, not directly on the base table. Create a view that hides salary and bank_account, then grant SELECT on the view to user auditor....
3 views
23 Jan 2026
You are deactivating contractor_user. Revoke all granted permissions first, then lock/disable the account (write generic SQL steps)....
2 views
23 Jan 2026
User app_user should not query base tables directly but can call procedures sp_place_order and sp_pay_order. Write grants only for procedures....
2 views
23 Jan 2026
If a user owns objects and you want to drop the user, what should you do first? Write a safe sequence in SQL terms....