Create a role and assign it
SQL
Easy
3 views
Problem Description
Create a role report_reader with SELECT on Customers and Orders, then grant the role to user rohit.
Input Format
SQL statements
Output Format
Role and privileges set
Sample Test Case
Input:
Customers, Orders tables exist
Constraints
Use role-based access
Official Solution
CREATE ROLE report_reader; GRANT SELECT ON Customers TO report_reader; GRANT SELECT ON Orders TO report_reader; GRANT report_reader TO rohit;
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!