Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mastering MySQL Basics

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What SQL command is used to retrieve data from a database?

a)

RETRIEVE

b)

GET

c)

SELECT

d)

FETCH

2.

Which SQL command is used to insert new records into a table?

a)

ADD RECORDS

b)

CREATE ENTRY

c)

UPDATE TABLE

d)

INSERT INTO

3.

What is the purpose of the UPDATE statement in SQL?

a)

To modify existing records in a table.

b)

To delete records from a table.

c)

To retrieve data from a table.

d)

To create new tables in a database.

4.

Which SQL command is used to delete records from a table?

a)

DELETE

b)

REMOVE

c)

DROP

d)

CLEAR

5.

What does RDBMS stand for?

a)

Relational Data Base Management System

b)

Relational Database Management System

c)

Remote Database Management System

d)

Real-time Database Management System

6.

Which of the following is an aggregate function in SQL?

a)

INSERT

b)

DROP

c)

UPDATE

d)

COUNT

7.

What is the result of the COUNT() function?

a)

The COUNT() function returns the average value of a column.

b)

The COUNT() function provides the maximum value in a dataset.

c)

The result of the COUNT() function is the total number of rows that meet the specified criteria.

d)

The COUNT() function calculates the sum of all values in a table.

8.

How do you select all columns from a table named 'students'?

a)

GET * FROM students;

b)

SELECT ALL FROM students;

c)

SELECT * FROM students;

d)

FETCH * FROM students;

9.

What SQL clause is used to filter records?

a)

SELECT

b)

FILTER

c)

WHERE

d)

ORDER BY

10.

Which SQL command is used to create a new table?

a)

INSERT TABLE

b)

MODIFY TABLE

c)

CREATE TABLE

d)

ADD TABLE

11.

What is the purpose of the GROUP BY clause in SQL?

a)

To group rows that have the same values in specified columns and perform aggregate calculations on them.

b)

To sort rows based on specified column values.

c)

To create new tables from existing data.

d)

To filter rows that meet certain criteria.

12.

How can you sort the results of a SELECT query?

a)

Use the GROUP BY clause in your SELECT query.

b)

Apply the FILTER function to your SELECT query.

c)

Utilize the HAVING clause in your SELECT query.

d)

Use the ORDER BY clause in your SELECT query.

13.

What is a primary key in a database?

a)

A primary key is a unique identifier for a record in a database table.

b)

A primary key is a random identifier for a record in a database table.

c)

A primary key is a duplicate identifier for multiple records in a database.

d)

A primary key is an optional identifier for a record in a database table.

14.

Which SQL function would you use to find the average value of a column?

a)

COUNT()

b)

MAX()

c)

SUM()

d)

AVG()

15.

What does the term 'foreign key' refer to in RDBMS?

a)

A foreign key is a type of index that speeds up data retrieval.

b)

A foreign key is a unique identifier for a record in the same table.

c)

A foreign key is a constraint that prevents duplicate entries in a table.

d)

A foreign key is a field in a table that links to the primary key of another table, establishing a relationship between the two.