wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

INTRO TO SQL

Total questions: 39

Worksheet time: 20mins

Name
Class
Date
1.

What does SQL stand for?

a)

Standard Query Language

b)

Sequential Query Language

c)

Structured Question Language

d)

Structured Query Language

2.

Match the following SQL term with a description - FROM

a)

The criteria which must be met

b)

The fields to display

c)

The field and order used to sort the results

d)

The table used in the query

3.

Match the following SQL term with a description - SELECT

a)

The fields to display

b)

The table used in the query

c)

The criteria which must be met

d)

The field and order used to sort the results

4.

Match the following SQL term with a description - WHERE

a)

The table used in the query

b)

The fields to display

c)

The field and order used to sort the results

d)

The criteria which must be set

5.

Match the following SQL term with a description - ORDER BY

a)

The fields to display

b)

The field and order used to sort the results

c)

The table used in the query

d)

The criteria that must be met

6.

In what order does SQL process the instructions?

a)

FROM - SELECT - WHERE - ORDER BY

b)

WHERE - FROM - SELECT - ORDER BY

c)

SELECT - FROM - WHERE - ORDER BY

d)

SELECT - FROM - ORDER By - WHERE

7.

Which of the following is not a database data type?

a)

text

b)

number

c)

array

d)

date

8.

Which example of the field name below is in camel case?

a)

First Name

b)

firstName

c)

FIRSTNAME

d)

firstname

9.

Which symbol would you use to represent more than 50

a)

= 50

b)

< 50

c)

> 50

d)

# 50

10.

The command to remove rows from a table 'CUSTOMER' is:

a)

REMOVE FROM CUSTOMER ...

b)

DROP FROM CUSTOMER ...

c)

DELETE FROM CUSTOMER WHERE ...

d)

UPDATE FROM CUSTOMER ...

11.

How can you change 'Thomas' to 'Michael' in the LastName column in the user table

a)

UPDATE User SET LastName = 'Thomas' INTO LastName = 'Michel'

b)

MODIFY Users SET LastName = 'Michel' WHERE LastName = 'Thomas'

c)

MODIFY Users SET LastName = 'Thomas' INTO LastName = 'Michel'

d)

UPDATE Users SET LastName = 'Michel' WHERE LastName = 'Thomas'

12.

Reorder the following

Order of keywords for SQL SELECT statements?

a)

SELECT

b)

FROM

c)

WHERE

d)

ORDER BY

1)
2)
3)
4)
13.

DDL means

(a)  

14.

DML means

(a)  

15.

To remove a record from a table which SQL statement would you use?

a)

Remove

b)

Cancel

c)

Delete

d)

Eradicate

16.

In order to modify data in a database we would use which SQL statement?

a)

Update

b)

Amend

c)

Alter

d)

Modify

17.

Which statement is used to extract data from a database?

a)

Extract

b)

Get

c)

Open

d)

Select

18.

Which statement allows us to add a record to a table?

a)

Add To

b)

Update To

c)

Add Into

d)

Insert Into

19.

Less than or equal to?

a)

>=

b)

=>

c)

=<

d)

<=

20.

Which word is missing from the following SQL statement?


Select * table_name

a)

With

b)

Where

c)

From

d)

And

21.

Where does the CREATE Command belong?

a)

DML

b)

DDL

c)

DCL

22.

It is a DML command that is used to display record.

a)

DISPLAY

b)

STRUCTURE

c)

WHERE

d)

SELECT

23.

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

a)

TRUE

b)

FALSE

24.

If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

a)

ASC

b)

DESC

c)

There is no default value

d)

None of the mentioned

25.

With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?

a)

SELECT * FROM Persons WHERE FirstName=’a’

b)

SELECT * FROM Persons WHERE FirstName LIKE ‘a%’

c)

SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

d)

SELECT * FROM Persons WHERE FirstName=’%a%’

26.

The UPDATE SQL clause can _____________

a)

update only one row at a time

b)

update more than one row at a time

c)

delete more than one row at a time

d)

delete only one row at a time

27.

How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?

a)

UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

b)

MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

c)

MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

d)

UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

28.

If you were wanting to filter data, which clause would you use?

a)

Where

b)

Order by

c)

From

d)

Select

29.

To remove a record from a table which SQL statement would you use?

a)

Remove

b)

Cancel

c)

Delete

d)

Eradicate

30.

Which character returns all the data found in a table?

a)

%

b)

#

c)

*

d)

/

31.

Which query command will a user adopt to answer the question, "Which student is below 15 years?"

a)

Cross-tab query

b)

Search Query

c)

Select query

d)

Update query

32.

What will be the following SOL syntax

do:

SELECT fiedlist

FROM tablename

IN anotherdatabase.mdb

WHERE condition

GROUP BY fieldlist

HAVING condition for field that are group

ORDERED BY fieldist

a)

Add records to the table

b)

Update records in the table

c)

Make a table from resulting values

d)

Select data from one or more tables and displaying the results

33.

The SQL statement used to read data from a table is

a)

Get

b)

Query

c)

Read

d)

Select

34.

In order to add a new row to an existing table, the SQL statement to use is

a)

CREATE

b)

INSERT

c)

UPDATE

d)

WHERE

35.

The database language that manages access to a database is called

a)

DCL

b)

DDL

c)

DLL

d)

DML

36.

In order to sort or arrange rows in a table on one or more columns in SQL, the statement to use is

a)

ARRANGE BY

b)

GROUP BY

c)

ORDER BY

d)

SORT BY

37.

A database language that informs database management system about the whole data structure and schema is called?

a)

DCL

b)

DDL

c)

DLL

d)

DML

38.

The correct order of keywords used in an SOL SELECT statement is

a)

FROM, SELECT, WHERE.

b)

SELECT, FROM, WHERE.

c)

SELECT, WHERE, FROM.

d)

WHERE, SELECT, FROM

39.

The object that stores commands to retrieve data from a created database is called a

a)

Form

b)

Query

c)

Report

d)

Table