[go: up one dir, main page]

0% found this document useful (0 votes)
59 views5 pages

Dbms Midterm Lab Exam 10 Items

DBMS midterm lab exam AMA university 10 items

Uploaded by

Jones
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views5 pages

Dbms Midterm Lab Exam 10 Items

DBMS midterm lab exam AMA university 10 items

Uploaded by

Jones
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column DESCRIPTION,
ONHAND and WAREHOUSE of all PARTS where ONHAND is greater than or
equal to 21.

SELECT DESCRIPTION, ONHAND, WAREHOUSE FROM PARTS


WHERE ONHAND >=21;
SELECT DESCRIPTION, ONHAND, WAREHOUSE FROM PARTS
WHERE ONHAND <=21;
SELECT DESCRIPTION, ONHAND, WAREHOUSE FROM PARTS
WHERE ONHAND =21;
SELECT DESCRIPTION, ONHAND, WAREHOUSE FROM PARTS
WHERE ONHAND >21;
Mark 1.00 out of 1.00

This is used to restrict the rows that are returned by a query.


Select one:

a.
Where

b.
Select

c.
Delete

d.
Insert

This is used to perform wildcard searches of valid search string


values.
Select one:

a.
Comparison
b.
IN

c.
Between

d.
Like

Given the output below. Which of the following is the correct PL/SQL to be used?

Select one:

a.

SELECT (PARTNUM|| belong to||DESCRIPTION) FROM PARTS WHERE CLASS


= ‘SG’;

b.

SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE


PARTNUM IN (‘BV06,’KV29’)

c.

SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE


CLASS = ‘SG’;

d.

SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE


CLASS = SG;

Feedback

Your answer is correct.

True/False. Character strings and date values are enclosed with


double quotation marks.
Answer: False
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column DESCRIPTION,
CLASS and PRICE of all PARTS where class is not equal to AP.

SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE


CLASS NOT LIKE ‘%AP%’;
SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE
CLASS NOT LIKE ‘%AP’;
SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE
CLASS != AP;
SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE
CLASS <> AP;
Mark 0.00 out of 1.00

Given the output below. Which of the following is the correct PL/SQL to be used?

Select one:

a.

SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS WHERE


WAREHOUSE >=1;

b.

SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS;


c.

SELECT WAREHOUSE, CLASS FROM PARTS WHERE CLASS IN


(‘AP’,’SG’,’HW’);

d.

SELECT WAREHOUSE, CLASS FROM PARTS;

Feedback

Your answer is incorrect.

This is used to in conditions that compare one expression with


another value or expression.
Select one:

a.
Comparison

b.
Logical Condition

c.
Subtraction

d.
Add

Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report that will display the DESCRIPTION,
WAREHOUSE AND distinct value for CLASS.
SELECT DESCRIPTION, WAREHOUSE, DISTINCT (CLASS)
FROM PARTS;
SELECT DESCRIPTION, WAREHOUSE, CLASS FROM PARTS;
SELECT DISTINCT DESCRIPTION, WAREHOUSE, CLASS
FROM PARTS;
SELECT DESCRIPTION, WAREHOUSE, DISTINCT ‘CLASS ‘
FROM PARTS;
Mark 0.00 out of 1.00

This is used to selects the rows in a table that are returned by a query. Various criteria
can be used to restrict the rows that are retrieved.

Select one:

a.
Selection

b.
Projection

c.
Inclusion

d.
Joins

You might also like