title | description | ms.reviewer | ms.topic | ms.date |
---|---|---|---|---|
.alter table policy restricted_view_access command |
Learn how to use the `.alter table policy restricted_view_access` command to turn on or turn off the table's restricted view access policy. |
yonil |
reference |
06/04/2023 |
Turn on or turn off the optional table restricted view access policy. When this policy is turned on for a table, data in the table can only be queried by principals who have an UnrestrictedViewer role in the database.
You must have at least Table Admin permissions to run this command.
Use the following syntax to turn on or turn off the policy for one table.
.alter
table
TableName policy
restricted_view_access
true
|false
Use the following syntax to turn on or turn off the policy for several tables.
.alter
tables
(
TableName,
TableName2 [,
...])
policy
restricted_view_access
true
|false
[!INCLUDE syntax-conventions-note]
Name | Type | Required | Description |
---|---|---|---|
TableName | string |
✔️ | The name of the table(s) to alter. |
.alter table MyTable policy restricted_view_access true
.alter tables (Table1, Table2, Table4) policy restricted_view_access false