Академический Документы
Профессиональный Документы
Культура Документы
Multiple Choice
Identify the choice that best completes the statement or answers the question.
1) All of the following are database four objects EXCEPT one:
a
c
Table
Field
b
d
Form
Query
2) This key uniquely identifies each record
a
Primary Key
b
Key Record
c
d
Unique Key
Field Name
a
b
<
>
c
d
^
<>
SELECT pet_breed, pet_color from tbl_pet where pet_gender ="female" and pet_age>=5
a
b
c
Empty set
Invalid SQL Statement
15)
Based on the table tbl_pet above, what is the display of the SQL command below:
SELECT pet_name, pet_breed from tbl_pet where pet_type ="dog" and pet_age<5;
a
NO Display
c
d
19)
No Display
Invalid
Consider the following tbl_pet records below, which of the following SQL command is used to
display this information?
a
b
c
d
SELECT
SELECT
SELECT
SELECT
pet_name, pet_gender
pet_name, pet_gender
pet_name, pet_gender
pet_name,pet_gender,
from
from
from
from
tbl_pet
tbl_pet
tbl_pet
tbl_pet
where
where
where
where
buyer_id=2;
buyer_id=4;
pet_id=2;
buyer_id=2;
B. Projected Table
Which of the following SQL command is used in B table if you base the information from A table?
a
b
c
d
SELECT
SELECT
SELECT
SELECT
pet_name,
pet_name,
pet_name,
pet_name,
21)
If the above information of your table is used, what SQL command will you invoke for the information
projected below?
b
c
d
and pet_gender="male";
SELECT pet_name, pet_gender, pet_breed from tbl_pet where pet_type= "dog"
and pet_gender=male;
SELECT pet_name, pet_breed from tbl_pet where pet_type= "dog" and
pet_gender="male";
SELECT pet_name, pet_gender, pet_breed *from tbl_pet where pet_type= "dog"
and pet_gender="male";
22)
Given the table of above of tbl_pet, what SQL command do you use for this information?
a
b
c
d
SELECT pet_name,
pet_price>423;
SELECT pet_name,
pet_price>=423;
SELECT pet_name,
pet_price>423;
SELECT pet_name,
pet_price>423;
23)
Find the SQL command used for this information projected based on the above records?
a
b
c
d
24)
SELECT
SELECT
SELECT
SELECT
25)
Which of the following SQL command is used for the projected table below:
a
b
c
d
26)
SELECT
SELECT
SELECT
SELECT
All of the following SQL statements are correct for showing above records, EXCEPT.
a
b
c
d
SELECT
SELECT
SELECT
SELECT
pet_name,
pet_name,
pet_name,
pet_name,
pet_type,pet_price
pet_type,pet_price
pet_type,pet_price
pet_type,pet_price
from
from
from
from
tbl_pet
tbl_pet
tbl_pet
tbl_pet
where
where
where
where
pet_type="snake";
pet_id=2;
pet_price>=42,233;
pet_price>=42233;
27)
28)
Which SQL statement is used for information below?
a
b
c
d
29)
Which SQL statement is used for information below?
a
b
c
d
select
select
select
select
pet_name,
pet_name,
pet_name,
pet_name,
pet_color,
pet_color,
pet_color,
pet_color,
30)
Which SQL statement is used for information below?
a
b
c
d
31) Which of the following is NOT valid SQL relational or comparison Operators?
a
b
<
=<
c
d
<>
=
Alters the tbl_pet table, and adds a field called "pet_type" of varchar
c
d
36) Given a table named tbl_store with 5 fields: store_id, address, city, state, zipcode, why would the
following insert command does NOT work?
insert into tbl_store values ('234 Park Street, Davao City, 8000');
You must specify the fields to insert if you are only inserting some of the fields.
b
c
d
Updates the tbl_pet table to have a price of 775 for all pets
Changes the price of a Pet 7 to 775
Changes the length of the Pet_Price field to 775
Selects all the fields from the owner table for each row with an owner labeled
"*"
Selects the "*" field from the tbl_owner table for each row with a owner live in
"Davao City"
Selects fields with a "*" in them from the tbl_owner table
c
d
Selects all the fields from the tbl_buyer table for each row with a owner live in
"Davao City"
40) To eliminate duplicate rows in a query, the ________ qualifier is used in the SQL Select command.
a
specific
alter
distinct
count
41) Which of the following counts ONLY rows that contain a value?
a
Count
Sum
Count(*)
Tally(*)
42) Which of the following will produce the minimum of all pet_price
a
b
c
d
The pet_id and pet_type for all pets whose age is 1 and 17
b
c
d
The pet_id and pet_type for all pets whose age is 0 and 18
The pet_id and pet_type for all pets whose age is between 0 and 18
The pet_id and pet_type for all pets whose age is between 1 and 17
44) Which of the following SQL command shows data dictionary? (Assumed that you have tbl_pet)
a
b
describe tbl_pet;
show databases;
c
d
show tables;
describe table tbl_pet;
45) Which of the following SQL command add new column named Owner_id to your table tbl_pet?
a
b
c
d
ALTER
ALTER
ALTER
ALTER
46) Which of the followig SQL command is correct in creating primary key to a table tbl_owner?
a
b
c
d
47)
Consider the information of the table tbl_pet above, which of the following SQL statement is correct
if you want to determine which female dog pet has the lowest price?
a
b
c
d
48)
0
1
c
d
2
3
show tables;
show databases;
c
d
Completion
Complete each statement.
50)
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
ANS:
C
A
B
B
D
C
C
C
B
A
C
D
D
A
A
A
A
A
A
A
A
A
A
A
A
C
A
D
A
A
B
D
D
A
C
C
B
C
D
B
A
D
D
A
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
PTS:
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
45)
46)
47)
48)
49)
ANS:
ANS:
ANS:
ANS:
ANS:
A
A
A
C
D
PTS:
PTS:
PTS:
PTS:
PTS:
1
1
1
1
1
COMPLETION
50) ANS:
PTS: 1