SQL GRANT Clause

Go back

You can grant permissions to each user, or grant permission to a role, and grant the role to each user. There are tons of privileges, so you should refer to the documentation of your RDBMS.

GRANT xxx, yyy ON sometable TO someuser
GRANT xxx, yyy ON sometable.* TO someuser
GRANT xxx, yyy ON sometable TO PUBLIC -- everyone
GRANT ALL PRIVILEGES ON sometable TO someuser -- all

You can allow someone to be able to grant their permissions:

GRANT xxx ON sometable TO someuser WITH GRANT OPTION

Note : you can only grant privileges on one table at once, and to one user per request.

Some privileges
SELECTDELETE
UPDATEUPDATE(ATTRIBUTE)
INSERTCREATE
ALTERDROP
EXECUTE...