Question
1
|
SELECT * FROM InventoryItems WHERE
InventoryItemID Between 1 and 10 |
|
|
UNION |
|
|
SELECT * FROM InventoryItems WHERE
InventoryItemID Between 5 and 10 |
|
|
UNION |
|
|
SELECT * FROM InventoryItems WHERE
InventoryItemID Between 10 and 20 |
|
|
a) All rows that have
InventoryItemID between 1 and 20 |
|
|
b) All rows that have
InventoryItemID between 1 and 20 excluding 1, 5, 10, and 20 |
|
|
c) All rows that have
InventoryItemID between 1 and 20 excluding duplicate rows |
|
|
d) All rows that have
InventoryItemID between 5 and 10 |
Question
2
|
SELECT ProductID FROM Invoices |
|
|
EXCEPT |
|
|
Select ProductID FROM
InventoryItems |
|
|
a) Returns all ProductID values
from both tables |
|
|
b) Returns all ProductID values
from Invoices that are not in InventoryItems |
|
|
c) Returns all ProductID values
from InventoryItems that are not in Invoices |
|
|
d) Returns no row |
Question
3
|
a) SELECT * FROM Vendors WHERE
Country =’a’ |
|
|
b) SELECT * FROM Vendors WHERE
Country LIKE ‘a%’ |
|
|
c) SELECT * FROM Vendors WHERE
Country LIKE ‘%a’ |
|
|
d) SELECT * FROM Vendors WHERE
Country =’%a%’ |
Question
4
|
a) SELECT * FROM Employees SORT BY
‘Title’ DESC |
|
|
b) SELECT * FROM Employees ORDER
Title DESC |
|
|
c) SELECT * FROM Employees SORT
‘Title’ DESC |
|
|
d) SELECT * FROM Employees ORDER
BY Title DE |
Question
5
|
SELECT * FROM InventoryItems WHERE
InventoryItemID BETWEEN 1 AND 10 |
|
|
UNION ALL |
|
|
SELECT * FROM InventoryItems WHERE
InventoryItemID BETWEEN 5 AND 15 |
|
|
a) All rows where the values in
InventoryItemID are from 5 to 10 |
|
|
b) All rows where the values in
InventoryItemID are from1 to 15 excluding duplicates |
|
|
c) All rows where the values in
InventoryItemID are from 1 to 10 |
|
|
d) All rows where the values in
InventoryItemID are from 1 to 15 |
Get Free Quote!
416 Experts Online