-- -----------------------------------------------------------------------------------
-- File Name    : user_system_privs.sql
-- Author       : DBA Learning Hub
-- Description  : Displays system privileges granted to a specified user.
-- Requirements : Access to the DBA views.
-- Call Syntax  : @user_system_privs (user-name)
-- Last Modified: 15/07/2025
-- -----------------------------------------------------------------------------------
SET LINESIZE 200 VERIFY OFF

SELECT grantee,
       privilege,
       admin_option
FROM   dba_sys_privs
WHERE  grantee = UPPER('&1')
ORDER BY grantee, privilege;

SET VERIFY ON