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

Dbms 1 Midterm Lab Exam 40-50

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

Dbms 1 Midterm Lab Exam 40-50

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 the DESCRIPTION and Price
(Note that in column PRICE add ADDITIONAL 10000). Get only the prices with no
digit that is equal to ‘5’. Note that you have to concatenate the said column and
rename the merge column as “New Price Lists”. Sort the data in DESC order by Price.

SELECT DESCRIPTION, PRICE + 10000 AS “NEW PRICE


LISTS” FROM PARTS ORDER BY PRICE DESC;
SELECT DESCRIPTION, PRICE + 10000 AS NEW PRICE LISTS
FROM PARTS ORDER BY PRICE DESC;
SELECT DESCRIPTION, PRICE + 10000 AS “NEW PRICE
LISTS” FROM PARTS ORDER BY PRICE;
SELECT DESCRIPTION, PRICE + 10000 + PRICE AS “NEW
PRICE LISTS” FROM PARTS ORDER BY PRICE DESC;
Mark 1.00 out of 1.00

It is a character, a number, or a date that is included in the


SELECT statement.
Select one:

a.
Alias

b.
Literal

c.
String

d.
Table name

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’ AND ONHAND BETWEEN 8 AND 12;

b.

SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS

WHERE CLASS = ‘AP’ OR ONHAND BETWEEN 8 AND 12;

c.

SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS

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

d.

SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS

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

Feedback

Your answer is incorrect.

This character is used to override the default precedence or to


clarify the statement.
Select one:

a.
*

b.
AS

c.

d.
||

Which of the following is not true about writing SQL statements?


Select one:

a.
Clauses are usually placed on separate lines for readability and
ease of editing.

b.
SQL statements are not case sensitive.

c.
Keywords cannot be split across lines or abbreviated.

d.
Indents should be used to make code more readable.

This is used to perform wildcard searches of valid search string


values.
Select one:

a.
Comparison

b.
Like

c.
Between

d.
IN

This is use to create expression with number and date values.


Select one:

a.
MDAS operator

b.
Numerical Values
c.
Arithmetic expression

d.
Logical Condition

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


Select one:

a.
Comparison

b.
IN

c.
Like

d.
Between

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

Select one:

a.

SELECT DESCRIPTION, PRICE *.5 +PRICE-100 FROM PARTS WHERE PRICE


<10000;

b.

SELECT DESCRIPTION, PRICE *.5 +PRICE-100 FROM PARTS WHERE PRICE


>10000;

c.

SELECT DESCRIPTION, (PRICE *.5 )+PRICE-100 FROM PARTS WHERE


PRICE >10000;

d.
SELECT DESCRIPTION, PRICE *.5 +(PRICE-100) FROM PARTS WHERE
PRICE <10000;

Feedback

Your answer is correct.

This is used to display rows based on a range of values.


Select one:

a.
Between

b.
Like

c.
Comparison

d.
IN

You might also like