NEW
Font size
WorksheetsQUIZ 3 - DFC2083
Total questions: 15
Worksheet time: 45mins
Which of the following is the Data Manipulation Language statement?
i. CREATE
ii. ALTER
iii. INSERT
iv. SELECT
i only
iii only
i and ii
iii and iv
Which of the following statement will delete column emp_name from EMPLOYEE table?
ALTER EMPLOYEE
DROP (emp_name);
ALTER TABLE EMPLOYEE
REMOVE (emp_name);
ALTER EMPLOYEE
REMOVE (emp_name);
ALTER TABLE EMPLOYEE
DROP (emp_name);
What does SQL stand for?
Structured Query Language
Structured Queue Language
Structured Question Language
Strong Query Language
What is the suitable SQL command to complete the statement below?
_____?____ STUDENT VALUES (“Haikal”, 21, “M”, 05, “DDT”);
UPDATE
DELETE FROM
INSERT INTO
SELECT * FROM
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;
SELECT emp_name, emp_age
FROM EMPLOYEE
WHERE emp_age <= 20 OR emp_age >=40;
SELECT emp_name, emp_age
FROM EMPLOYEE
WHERE emp_age < 20 OR emp_age >40;
SELECT emp_name, emp_age
FROM EMPLOYEE
WHERE emp_age BETWEEN 20 OR 40;
SELECT emp_name, emp_age
FROM EMPLOYEE
WHERE emp_age BETWEEN 20 AND 40;
Which SQL statement used to extract data from a database?
OPEN
SELECT
GET
EXTRACT
Which one is NOT in the group function provided by SQL?
AVG
MAX
TOTAL
COUNT
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"?
SELECT * FROM Stationary
WHERE ProdName ='%e%'
SELECT * FROM Stationary
WHERE ProdName LIKE '%e'
SELECT * FROM Stationary
WHERE ProdName LIKE 'e%'
SELECT * FROM Stationary
WHERE ProdName ='e'
Given table EMPLOYEE as shown above, What is the suitable SQL statement to modify the emp_name values of all the record to Zahin?
UPDATE EMPLOYEE
SET emp_name = ‘Zahin’;
ALTER EMPLOYEE
SET emp_name = ‘Zahin’;
ALTER EMPLOYEE
SET emp_name = ‘Zahin’
WHERE emp_name = ‘Zahin’;
UPDATE EMPLOYEE
SET emp_name = ‘Zahin’
WHERE emp_name = “Kamal”;
Which group function would you use to display the lowest value in the Student_HPNM column?
MAX
MIN
AVG
COUNT
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;
0
2
3
5
Identify the query to ELIMINATE a table from a database.
REMOVE TABLE SUBJECT
DELETE TABLE SUBJECT
UPDATE TABLE SUBJECT
DROP TABLE SUBJECT
Based on above, identify the CORRECT SQL statement to update Marsya’s birth state from Kedah to Selangor.
ALTER STUDENT
SET birthstate = “Selangor”;
UPDATE STUDENT
SET birthstate = “Selangor”
WHERE student_no = 103;
ALTER STUDENT
SET birthstate = “Selangor”
WHERE student_no = 103;
UPDATE STUDENT
birthstate = “Selangor”;
Determine the type of SQL that used to control the user access to the database, tables, views, procedures, functions and packages
Data Control Language (DCL)
Data Definition Language (DDL)
Data Manipulation Language (DML)
Transaction Control Language (TCL)
Which SQL keyword that is used to sort the result in the table?
ORDER
ORDER BY
SORT
SORT BY
