Please do in Oracle SQL
Create a table UserPermissions (provide create and insert statements code)
Document
|
UserName
|
Policy
|
SYSTEM
|
Menu
|
JDOW
|
W2
|
USAM
|
Permissions
|
SYSTEM
|
W2
|
JDOW
|
Form 1040
|
USAM
|
Policy
|
JDOW
|
W2
|
SYSTEM
|
Write a PL/SQL stored function that takes username as input and returns number of documents that user has permissions to view. If username is not in the table, your procedure should return, "User not found".
Sample output:
JDOW can view 3 document(s)
SYSTEM can view 3 document(s)
USAM can view 2 document(s)