从表中删除行时的权限
我有一个表,其中的行具有重复的 userId。我正在尝试将行删除为
delete from table_name where userId=123
仅当我向数据库授予选择和删除权限时,此查询才有效。是否必须授予选择权限?
I have a table with rows having duplicate userId's. I am trying to delete the row's as
delete from table_name where userId=123
This query works only if I give both select and delete permissions to the database. Is is compulsory to grant the select permission?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目标表需要 DELETE 权限。如果语句包含 WHERE 子句,则还需要 SELECT 权限。这是来自微软的链接,请参阅权限部分
http://msdn.microsoft.com/ en-us/library/ms189835.aspx
DELETE permissions are required on the target table. SELECT permissions are also required if the statement contains a WHERE clause. Here is link from microsoft, refer permission section
http://msdn.microsoft.com/en-us/library/ms189835.aspx