Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MySQL Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What does SQL stand for?

a)

Structured Query Language

b)

Super Query Language

c)

Simple Query Language

d)

Student Query Language

2.

What is a primary key?

a)

A unique attribute used to identify a single record

b)

A key that is always a foreign key

c)

A key that can be duplicated

d)

A key that can be NULL

3.

Which command is used to create a new database?

a)

NEW DATABASE

b)

CREATE DATABASE

c)

CREATE TABLE

d)

INSERT DATABASE

4.

What is the purpose of the DELETE command?

a)

To remove a table

b)

To remove a column

c)

To remove a database

d)

To remove records from a table

5.

Which of the following is a valid data type for strings in MySQL?

a)

INTEGER

b)

VARCHAR

c)

FLOAT

d)

BOOLEAN

6.

What does the NOT NULL constraint do?

a)

Allows NULL values in a column

b)

Sets a default value for a column

c)

Ensures a column cannot have a NULL value

d)

Allows duplicate values in a column

7.

Which command is used to modify existing records in a table?

a)

CHANGE

b)

ALTER

c)

INSERT

d)

UPDATE

8.

What is the purpose of a foreign key?

a)

To delete records

b)

To create a new table

c)

To maintain relationships between tables

d)

To uniquely identify a record

9.

What is the correct syntax to insert a record into a table?

a)

INSERT INTO table_name (column1, column2) VALUES (value1, value2)

b)

INSERT table_name VALUES (column1, column2)

c)

INSERT table_name (column1, column2) VALUES (value1, value2)

d)

INSERT INTO table_name (column1, column2) VALUE (value1, value2)

e)

INSERT INTO table_name (column1, column12) VALUE (value1, value2)

10.

Which of the following is NOT a MySQL data type for numbers?

a)

CHAR

b)

FLOAT

c)

DECIMAL

d)

TINYINT