Home > Software design >  MySQL grant select to all columns in table except one column
MySQL grant select to all columns in table except one column

Time:05-02

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

CodePudding user response:

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;

CodePudding user response:

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
  • Related