exam questions

Exam 1z0-908 All Questions

View all questions & answers for the 1z0-908 exam

Exam 1z0-908 topic 1 question 50 discussion

Actual exam question from Oracle's 1z0-908
Question #: 50
Topic #: 1
[All 1z0-908 Questions]

Examine this SQL statement:

Which set of privileges will allow Tom to execute this SQL statement?

  • A. GRANT ALL PRIVILEGES ON ‘world’.‘city’ TO ‘tom’@’%’;
    GRANT SELECT (‘code’) ON ‘world’.‘country’ TO ‘tom’@’%’;
  • B. GRANT UPDATE ON ‘world’.* TO ‘tom’@’%’;
    GRANT ALL PRIVILEGES ON ‘world’.‘country’ TO ‘tom’@’%’;
  • C. GRANT UPDATE ON ‘world’.‘city’ TO ‘tom’@’%’;
    GRANT SELECT ON ‘world’.* TO ‘tom’@’%’;
  • D. GRANT UPDATE ON ‘world’.‘city’ TO ‘tom’@’%’;
    GRANT SELECT ON ‘world’.‘country’ TO ‘tom’@’%’;
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
LrnsTgh
6 months, 4 weeks ago
Selected Answer: C
agree with C. I took the least privileges only. C -> Query OK, 1766 rows affected (0.0211 sec) Rows matched: 1766 Changed: 1766 Warnings: 0 D-> ERROR: 1143: SELECT command denied to user 't***h'@'localhost' for column 'CountryCode' in table 'city'
upvoted 1 times
...
marklv
7 months, 3 weeks ago
Sorry for changing my answers. C. read and write to city, read from country, and two columns from country need to be read. Only C works. A won't work because you need to read from two columns in country, not just one. B won't work because you need to read from city. D won't work because you need to read from city as well.
upvoted 1 times
...
marklv
9 months, 3 weeks ago
city need to read and write, it needs to read CountryCode. Thus A, all privs includes read. BCD and all work if you just need to update city and read from country.
upvoted 1 times
...
FelipeK
10 months ago
Selected Answer: C
The righ answer is C
upvoted 2 times
...
marklv
11 months, 1 week ago
Not sure why B and C won't work. Especially C, since it includes D
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago