0

It is possible to grant select all columns in table except one for user? I tried to search any way to do this and read some docs, but can`t find solution

aurorame
  • 31
  • 6
  • Does this answer your question? [How to "subtract" privileges in MySQL](https://stackoverflow.com/questions/8131849/how-to-subtract-privileges-in-mysql) –  May 02 '22 at 04:23

2 Answers2

0

For example, you want to grant update privilege on ename column only, then give the following statement (where xyz is the username)

grant update (ename) on emp to xyz;

0

You have to name all the other columns, which could be tedious if it is a large table.

GRANT SELECT(col1,...,col99)
ON table_name
TO user_name