wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DBMS_LAB_06_12_22_Batch 1 2

Total questions: 20

Worksheet time: 16mins

Name
Class
Date
1.

Which option is not the command of DML ?

a)

insert

b)

update

c)

alter

d)

delete

2.

drop, truncate, create are the commands of DDL?

a)

True

b)

False

3.

____ is the clause which we use to choose the required data in the OUTPUT from the original table.

a)

select

b)

where

c)

group by

d)
4.

_____ is used to filter out the data by applying condition on grouped data.

a)

where

b)

from

c)

having

d)

order by

5.

How could we choose only unique values in a query?

a)

SELECT UNIQUE

b)

SELECT DISTINCT

c)

SELECT SPECIAL

d)

SELECT WITH NO DUPLICATE

6.

What is the syntax to enter a new record into the "Sales" table?

a)

INSERT INTO Sales VALUES

b)

ALTER SALES NEW VALUES

c)

SALES = SALES + NEW VALUES

d)

SALES.ALTER.EDIT.CHANGE

7.

What is the syntax to create a new table?

a)

CREATE TABLE

b)

MAKE TABLE

c)

GENERATE TABLE

d)

NEW TABLE

8.

Which command is used for removing a table and all its data from the database:

a)

Create command

b)

Drop table command

c)

Alter table command

d)

All of the mentioned

9.

SELECT * FROM Students WHERE Gender="Female" AND Class=2.2

would return how many records?

a)

1

b)

2

c)

3

d)

4

10.

SELECT * FROM cars WHERE Doors > 3

would return how many records?

a)

1

b)

2

c)

3

d)

4

11.

A primary key can be NULL in the table? TRUE or FALSE

a)

TRUE

b)

FALSE

12.

A keyword that use in sql syntax that gives a temporary name in the table column?

a)

US

b)

AS

c)

ALIASES

d)

SQL SYNTAX

13.

Records that generate the matching values in both table

a)

Right join

b)

Inner join

c)

Cross join

d)

Case Statement

14.

What is the difference between WHERE and HAVING?

a)

HAVING only applies to aggregate functions like GROUP BY

b)

There are interchangeable

c)

WHERE specifies a GEOGRAPHIC location for a database server

d)

WHERE has limited use

15.

Why make views?

a)

It is faster, safer and better practice to not allow general access to the production database

b)

You should not, they are slow

c)

You should not, they are inefficient

d)

"View" is simply a synonym for the return of the SELECT function

16.

ORDER BY specifies ...................................

a)

the criteria you need to find the information

b)

the table(s) that contain(s) the information

c)

the information you want to find within the database

d)

how the data is organized (sorted) when it is retrieved.

17.

The SQL DELETE statement has the following structure:

a)

DELETE FROM

Table

WHERE

Condition

b)

DELETE FROM

Table

WHERE

Record

c)

DELETE FROM

Field

WHERE

Table

18.

Clause to extract details of employees whose FIRST NAME contains "are" anywhere is:

a)

LIKE ('are%')

b)

LIKE ('%are')

c)

LIKE ('_are%')

d)

LIKE ('%are%')

19.

Which SQL keyword is used to make changes to the structure of a table (e.g. adding new columns)?

a)

CHANGE

b)

DROP

c)

UPDATE

d)

ALTER

20.

Subqueries

a)

Copy contents from one table into a brand new table

b)

conditional that needs to be met by all terms

c)

more powerful way to write queries (multiple for one combo); make sure to indent and color code each section

d)

returns the string's soundex value (four character code that is based on how the string sounds when spoken in English