May 2018
Intermediate to advanced
576 pages
30h 25m
English
Consider a table t with columns c1, c2, and c3; there are two different ways of authorizing user u to perform the following query:
SELECT * FROM t;
The first is by granting a table-level privilege as follows:
GRANT SELECT ON TABLE t TO u;
The alternative way is by granting column-level privileges as follows:
GRANT SELECT (c1,c2,c3) ON TABLE t TO u;
Despite these two ways having overlapping effects, table-level privileges are distinct from column-level privileges, which is correct since the meaning of each is different. Granting privileges on a table means to all columns present and future, while column-level privileges require the explicit indication of columns and, therefore, don't extend automatically to new columns.