Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SEMIFINAL EXAM IN INFORMATION MANAGEMENT_BSIT 2A

Total questions: 16

Worksheet time: 14mins

Name
Class
Date
1.

Which is the correct SQL Statement to add a column 'region_id' to the table locations.

a)

ALTER TABLE locations

ADD region_id INT;

b)

UPDATE TABLE locations

ADD region_id INT;

c)

ALTER TABLE locations

SET region_id as INT;

2.

What is the write query statement to get unique department ID from Employee table?

a)

SELECT UNIQUE department_id

FROM Employees;

b)

SELECT DISTINCT department_id

FROM Employees;

c)

SELECT EXISTS department_id

FROM Employees

WHERE department_id = NOT EXISTS;

3.

To name a new column, use _ clause and use mathematical operators for the computation

(a)  

4.

DELETE TABLE statement unlike the DROP command, not only deletes all the records in a table but deletes the table itself, making you unable to perform SQL commands into the table ever again.

a)

True

b)

False

5.

All are correct about INSERT statements except:

a)

selected columns in the table will be inserted with a value

b)

the values in the statement should match the number of columns defined in the statement

c)

In most cases it should also include a WHERE clause.

6.

In the _ syntax no column names are defined, since you are essentially deleting an entire record from a table.

(a)  

7.

OPERATORS are used to compare and evaluate values and they usually appear inside the conditional statements in a WHERE Clause.

a)

TRUE

b)

FALSE

8.

MS Access uses an _ instead of the percent sign (%), and a question mark (?) instead of the underscore (_).

(a)  

9.

What character is used to substitute one or more characters in a string?

a)

Wildcard

b)

Percent sign

c)

Question Mark

10.

Among the CRUD commands we have discussed, which would be the "safest"?

(a)  

11.

They are called _ in SQL because they used to give a database or column name a temporary name to make it more readable.

a)

ALIASES

b)

UNIQUE

c)

DISTINCT

12.

This clause is used to define the order of the query output either in ascending (ASC) or in descending (DESC). Ascending (ASC) is set as the default one but descending (DESC) is set explicitly.

a)

ORDER BY Clause

b)

SORT BY Clause

c)

GROUP BY

13.

How to write a query to show the details of a student from Students table whose name starts with J?

a)

SELECT * FROM Students WHERE StudName like ‘*J*’;

b)

SELECT * FROM Students WHERE StudName like ‘J*’;

c)

SELECT FROM Students WHERE StudName like ‘*J’;

14.

When a table’s primary key field is added to related tables in order to create the common field which relates the two tables, it called a _ key in other tables.

(a)  

15.

How can we avoid duplicating records in a query?

a)

By using the DISTINCT keyword, duplication of records in a query can be avoided.

b)

Provide set of rules that restrict the values of one or more columns of the tables based on the values of the primary key or unique key of the referenced table.

16.

How many customers purchased an item labeled as "raft"?

a)

SELECT COUNT

(customerID)

FROM items_ordered

WHERE item='raft';

b)

SELECT * AS COUNT

(customerID)

WHERE item='raft'

FROM items_ordered;

c)

SELECT

(customerID) COUNT FROM items_ordered

WHERE item='raft' ;