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

Dbms 1 Midterm Lab Exam 30-40

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)
31 views5 pages

Dbms 1 Midterm Lab Exam 30-40

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,
WAREHOUSE, CLASS and PRICE of all parts where the description contains
keyword ‘SHE’.

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM


PARTS WHERE DESCRIPTION LIKE ‘%SHE%’;
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM
PARTS WHERE DESCRIPTION LIKE ‘SHE%’;
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM
PARTS WHERE DESCRIPTION LIKE ‘%SHE’;
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM
PARTS WHERE DESCRIPTION LIKE ‘SHE’;
Mark 1.00 out of 1.00

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

Which of the following is the correct report showing all rows and columns sort the
description in ascending order.

SELECT * FROM PARTS ORDER BY DESCRIPTION DESC;


SELECT * FROM PARTS ORDER BY DESCRIPTION;
SELECT * FROM PARTS ORDER BY DESCRIPTION ASC;
SELECT * FROM PARTS ORDER BY DESC;
Mark 0.00 out of 1.00

This is used to brings together data that is stored in different tables


by specifying the link between them.
Select one:

a.
Projection

b.
Joins

c.
Inclusion

d.
Selection

This is use to Selects the columns in a table that are returned by a


query. Selects a few or as many of the columns as required.
Select one:

a.
Inclusion

b.
Selection

c.
Projection

d.
Joins

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 PARTNUM,
CLASS and ONHAND of all parts where partnum is equal to AT94, DR93 and
KV29. (Note 1 query only and do not use logical condition)

SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE


PARTNUM IN (‘AT94’,’DR93’,’KV29’);
SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE
PARTNUM IN (AT94,DR93,KV29);
SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE
PARTNUM = (‘AT94’,’DR93’,’KV29’);
SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE
PARTNUM NOT IN (‘AT94’,’DR93’,’KV29’);
Mark 1.00 out of 1.00

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 CLASS,
DESCRIPTION and PRICE of all PARTS where price range is between 200 to 500.
Sort the Price in descending order.

SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE


PRICE BETWEEN 200 AND 500;
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE
PRICE BETWEEN 500 AND 500;
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE
PRICE BETWEEN =200 AND 500;
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE
PRICE BETWEEN 200 AND BETWEEN 500;
Mark 1.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 DESCRIPTION, ONHAND, CLASS

FROM PARTS

WHERE CLASS = ‘AP’ OR DESCRIPTION LIKE ‘__S%’;

b.

SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS

WHERE CLASS = ‘AP’ AND DESCRIPTION LIKE ‘__S%’;

c.

SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS

WHERE CLASS = ‘AP’ OR ONHAND BETWEEEN 8 AND 12

d.

SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS

WHERE CLASS = ‘AP’ OR ONHAND >=8;

Feedback

Your answer is correct.

True/False. This symbol % denotes zero or many characters.


Answer: True

This is used to test for values in a specified set of values.


Select one:

a.
Between
b.
IN

c.
Like

d.
Comparison

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

Select one:

a.

SELECT * FROM TABLE PARTS;

b.

SELECT * FROM PARTS;

c.

SELECT ALL FROM PARTS;

d.

SELECT ALL COLUMN FROM PARTS;

Feedback

Your answer is correct.

You might also like