Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permissions while deleting rows from a table

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?

like image 767
Naveen Avatar asked Jun 07 '26 04:06

Naveen


1 Answers

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

like image 113
kosa Avatar answered Jun 10 '26 19:06

kosa