|
Transact-SQL User's Guide
|
Using views as security mechanisms
Permission to access the subset of data in a view must be
explicitly granted or revoked, regardless of the permissions in
force on the view's underlying tables. Data in an underlying
table that is not included in the view is hidden from users who
are authorized to access the view but not the underlying table.
For example, you may not want some users to access the columns
that have to do with money and sales in the titles table.
You can create a view of the titles table that
omits those columns, and then give all users permission on the view,
and give only the Sales Department permission on the table. For
example:
revoke all on titles to public
grant all on bookview to public
grant all on titles to sales
For information about how to grant or revoke permissions,
see the System Administration Guide.