UNISA 2024 INF3707-24-Y Welcome Message Assessment 4
QUIZ
Started on Thursday, 5 September 2024, 6:27 PM
State Finished
Completed on Thursday, 5 September 2024, 7:17 PM
Time taken 49 mins 55 secs
Grade 80.00 out of 100.00
Question 1
Complete
Mark 4.00 out of 4.00
The user Alice wants to grant all users query privileges on her Orders table. Which SQL statement accomplishes this?
a. Grant select on Orders to all_users
b. Grant select on Orders to_all
c. Grant query on Orders to_public
d. Grant select on Orders to public
Question 2
Complete
Mark 4.00 out of 4.00
Which of the following will display the new retail price of each book as 20 percent more than its originally cost?
a. SELECT title, retail*.2 "New Retail Price" FROM books
b. SELECT title, retail+.20 "New Retail Price" FROM books
c. SELECT title, cost*.20 "New Retail Price" FROM books
d. SELECT title, cost*1.20 "New Retail Price" FROM books
, Question 3
Complete
Mark 4.00 out of 4.00
What does the following query?
SELECT isbn, title FROM books
WHERE (pubid, category) IN
(SELECT pubid, category
FROM books WHERE title LIKE ‘%ORACLE%’);
a. It determines which publisher published a book belonging to the oracle category and then lists all other books
published by the same publisher.
b. It lists all publishers and categories containing the value oracle
c. It lists the ISBN and title of all books belonging to the same category and having the same publisher as any book
with the phrase ORACLE in its title
d. The query contains a multiple row operator and because the inner query only returns one value, the select statement
will fail and return an error message.
Question 4
Complete
Mark 0.00 out of 4.00
Where can subqueries be used? Choose the best answer.
a. Field names in the SELECT statement
b. For constraints statements only
c. The GROUP BY clause in the SELECT statement
d. The WHERE clause in only the SELECT statement
Question 5
Complete
Mark 4.00 out of 4.00
Which of the following commands eliminates only the user ELPOEZ’s ability to enter new books in the BOOKS table?
a. Revoke insert on books from elopez
b. Revoke insert from elopez
c. Revoke insert into from elopez
d. Drop insert into books from elopez
QUIZ
Started on Thursday, 5 September 2024, 6:27 PM
State Finished
Completed on Thursday, 5 September 2024, 7:17 PM
Time taken 49 mins 55 secs
Grade 80.00 out of 100.00
Question 1
Complete
Mark 4.00 out of 4.00
The user Alice wants to grant all users query privileges on her Orders table. Which SQL statement accomplishes this?
a. Grant select on Orders to all_users
b. Grant select on Orders to_all
c. Grant query on Orders to_public
d. Grant select on Orders to public
Question 2
Complete
Mark 4.00 out of 4.00
Which of the following will display the new retail price of each book as 20 percent more than its originally cost?
a. SELECT title, retail*.2 "New Retail Price" FROM books
b. SELECT title, retail+.20 "New Retail Price" FROM books
c. SELECT title, cost*.20 "New Retail Price" FROM books
d. SELECT title, cost*1.20 "New Retail Price" FROM books
, Question 3
Complete
Mark 4.00 out of 4.00
What does the following query?
SELECT isbn, title FROM books
WHERE (pubid, category) IN
(SELECT pubid, category
FROM books WHERE title LIKE ‘%ORACLE%’);
a. It determines which publisher published a book belonging to the oracle category and then lists all other books
published by the same publisher.
b. It lists all publishers and categories containing the value oracle
c. It lists the ISBN and title of all books belonging to the same category and having the same publisher as any book
with the phrase ORACLE in its title
d. The query contains a multiple row operator and because the inner query only returns one value, the select statement
will fail and return an error message.
Question 4
Complete
Mark 0.00 out of 4.00
Where can subqueries be used? Choose the best answer.
a. Field names in the SELECT statement
b. For constraints statements only
c. The GROUP BY clause in the SELECT statement
d. The WHERE clause in only the SELECT statement
Question 5
Complete
Mark 4.00 out of 4.00
Which of the following commands eliminates only the user ELPOEZ’s ability to enter new books in the BOOKS table?
a. Revoke insert on books from elopez
b. Revoke insert from elopez
c. Revoke insert into from elopez
d. Drop insert into books from elopez