Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.57 KB

alter-table-restricted-view-access-policy-command.md

File metadata and controls

46 lines (30 loc) · 1.57 KB
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

.alter table policy restricted_view_access command

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.

Permissions

You must have at least Table Admin permissions to run this command.

Syntax

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]

Parameters

Name Type Required Description
TableName string ✔️ The name of the table(s) to alter.

Examples

Turn on a policy for a table

.alter table MyTable policy restricted_view_access true

Turn off the policy of several tables

.alter tables (Table1, Table2, Table4) policy restricted_view_access false