wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

QUIZ 3 - DFC2083

Total questions: 15

Worksheet time: 45mins

Name
Class
Date
1.

Which of the following is the Data Manipulation Language statement?


i. CREATE

ii. ALTER

iii. INSERT

iv. SELECT

a)

i only

b)

iii only

c)

i and ii

d)

iii and iv

2.

Which of the following statement will delete column emp_name from EMPLOYEE table?

a)

ALTER EMPLOYEE

DROP (emp_name);

b)

ALTER TABLE EMPLOYEE

REMOVE (emp_name);

c)

ALTER EMPLOYEE

REMOVE (emp_name);

d)

ALTER TABLE EMPLOYEE

DROP (emp_name);

3.

What does SQL stand for?

a)

Structured Query Language

b)

Structured Queue Language

c)

Structured Question Language

d)

Strong Query Language

4.

What is the suitable SQL command to complete the statement below?

_____?____ STUDENT VALUES (“Haikal”, 21, “M”, 05, “DDT”);

a)

UPDATE

b)

DELETE FROM

c)

INSERT INTO

d)

SELECT * FROM

5.

Based on the query statement below. Which of the following statement will give the same output?


SELECT emp_name, emp_age

FROM EMPLOYEE

WHERE emp_age >= 20 AND emp_age <=40;

a)

SELECT emp_name, emp_age

FROM EMPLOYEE

WHERE emp_age <= 20 OR emp_age >=40;

b)

SELECT emp_name, emp_age

FROM EMPLOYEE

WHERE emp_age < 20 OR emp_age >40;

c)

SELECT emp_name, emp_age

FROM EMPLOYEE

WHERE emp_age BETWEEN 20 OR 40;

d)

SELECT emp_name, emp_age

FROM EMPLOYEE

WHERE emp_age BETWEEN 20 AND 40;

6.

Which SQL statement used to extract data from a database?

a)

OPEN

b)

SELECT

c)

GET

d)

EXTRACT

7.

Which one is NOT in the group function provided by SQL?

a)

AVG

b)

MAX

c)

TOTAL

d)

COUNT

8.

With SQL, how do you select all the records from a table named "Stationary" where the value of the column "ProdName" starts with an "e"?

a)

SELECT * FROM Stationary

WHERE ProdName ='%e%'

b)

SELECT * FROM Stationary

WHERE ProdName LIKE '%e'

c)

SELECT * FROM Stationary

WHERE ProdName LIKE 'e%'

d)

SELECT * FROM Stationary

WHERE ProdName ='e'

9.

Given table EMPLOYEE as shown above, What is the suitable SQL statement to modify the emp_name values of all the record to Zahin?

a)

UPDATE EMPLOYEE

SET emp_name = ‘Zahin’;

b)

ALTER EMPLOYEE

SET emp_name = ‘Zahin’;

c)

ALTER EMPLOYEE

SET emp_name = ‘Zahin’

WHERE emp_name = ‘Zahin’;

d)

UPDATE EMPLOYEE

SET emp_name = ‘Zahin’

WHERE emp_name = “Kamal”;

10.

Which group function would you use to display the lowest value in the Student_HPNM column?

a)

MAX

b)

MIN

c)

AVG

d)

COUNT

11.

Based on SQL statement below, determine the correct value that will be returned if a table contains 40, 30, 20, NULL, NULL for col1?


SELECT COUNT(col1)

FROM MARKAH;

a)

0

b)

2

c)

3

d)

5

12.

Identify the query to ELIMINATE a table from a database.

a)

REMOVE TABLE SUBJECT

b)

DELETE TABLE SUBJECT

c)

UPDATE TABLE SUBJECT

d)

DROP TABLE SUBJECT

13.

Based on above, identify the CORRECT SQL statement to update Marsya’s birth state from Kedah to Selangor.

a)

ALTER STUDENT

SET birthstate = “Selangor”;

b)

UPDATE STUDENT

SET birthstate = “Selangor”

WHERE student_no = 103;

c)

ALTER STUDENT

SET birthstate = “Selangor”

WHERE student_no = 103;

d)

UPDATE STUDENT

birthstate = “Selangor”;

14.

Determine the type of SQL that used to control the user access to the database, tables, views, procedures, functions and packages

a)

Data Control Language (DCL)

b)

Data Definition Language (DDL)

c)

Data Manipulation Language (DML)

d)

Transaction Control Language (TCL)

15.

Which SQL keyword that is used to sort the result in the table?

a)

ORDER

b)

ORDER BY

c)

SORT

d)

SORT BY