简体   繁体   English

允许更新SQL Server表中的单列

[英]Permission to update single column in SQL Server table

How to create a permission to update a specific column in SQL Table. 如何创建权限来更新SQL表中的特定列。

This is my scenario - Created a user in DB with Read only permission (only select command work) and I want to create new permission to update a column for a specific SQL table. 这是我的情况-在数据库中创建了具有只读权限的用户(仅select命令有效),并且我想创建新的权限来更新特定SQL表的列。

Appreciated your help. 感谢您的帮助。

Regards 问候
Abdul 阿卜杜勒

Pretty sure you'd just GRANT the permissions like this: 很肯定你只是GRANT这样的权限:

GRANT UPDATE ON dbo.TableName (Col1, Col2, Col7) TO YourUsersName;

Assuming dbo.TableName has 7 columns, Col1-Col7, the above statement will give the user permission to update Col1, Col2, and Col7, but not Col3, Col4, Col5, or Col6. 假设dbo.TableName具有7列Col1-Col7,则上述语句将授予用户更新Col1,Col2和Col7的权限,而不是更新Col3,Col4,Col5或Col6的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM