WITH OWNERACCESS OPTION Declaration (SQL Only)

See AlsosqlWithOwnerAccessOptionSee

Description

In a multiuser environment with a secure system, use WITH OWNERACCESS OPTION to give the user who runs the query permission to view the data in the query even if he or she is otherwise restricted from viewing the query's underlying tables.

Notes

         WITH OWNERACCESS OPTION is optional but when included usually follows ORDER BY.  The following example allows salary information to be accessed, even if the user doesn't otherwise have permission to read the Payroll table.

SELECT [Last Name], [First Name], Salary
FROM Employees, Payroll
ORDER BY [Last Name]
WITH OWNERACCESS OPTION

 

         If a user is otherwise prevented from creating or adding to a table, you can use WITH OWNERACCESS OPTION to allow the user to run a make-table or append query.

         If you want to enforce system security settings and users' permissions, don't include the WITH OWNERACCESS OPTION declaration.