wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Latihan Basic Mysql

Total questions: 21

Worksheet time: 9mins

Name
Class
Date
1.

What does SQL stand for?

a)

Structured Query Language

b)

Structured Question Language

c)

Strong Question Language

d)

None of the above

2.

What does DML stand for?

a)

Data Manipulation Language

b)

Data Modeling Language

c)

Data Markup Language

d)

Data Migration Language

3.

INSERT INTO EMP VALUES(101,'SUMAN','MANAGER');


Which kind of statement is this ?

a)

DDL

b)

DML

c)

Value

d)

Python statement

4.

Which of the following is not a keyword of MYSQL?

a)

Select

b)

Top

c)

Group

d)

Insert

5.

Which of the following query is correct to get Current Date from Query?

A. SELECT DATE ( NOW() ) as today;

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

a)

A. SELECT DATE ( NOW() ) as today;

b)

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

c)

Both A and B

d)

None

6.

Which of the following is not a valid aggregate function?

a)

COUNT

b)

MIN

c)

COMPUTE

d)

MAX

7.

SQL is not case sensitive. SELECT is the same as select.

a)

TRUE

b)

FALSE

8.

The _________ statement is used to delete a table.

a)

DROP TABLE

b)

DELETE TABLE

c)

DEL TABLE

d)

REMOVE TABLE

9.

Which one of the following sorts rows in SQL?

a)

SORT BY

b)

ALIGN BY

c)

GROUP BY

d)

ORDER BY

10.

The SQL statement that queries or reads data from a table is __________ .

a)

USE

b)

SELECT

c)

READ

d)

QUERY

11.

With SQL, how do you select all the columns from a table named "Persons"?

a)

SELECT * FROM Persons

b)

SELECT Persons

c)

SELECT [all] FROM Persons

d)

SELECT *.Persons

12.

In a LIKE clause, you can ask for any 6 letter value by writing

a)

LIKE ______ (that's six underscore characters)

b)

LIKE ...... (that's six dots)

c)

LIKE .{6}

d)

LIKE ??????

13.

Which SQL statement is used to update data in a database?

a)

MODIFY

b)

ALTER

c)

SAVE

d)

UPDATE

14.

The SQL keyword BETWEEN is used:

a)

For ranges.

b)

To limit the columns displayed.

c)

As a wildcard.

d)

None of the above

15.

Which clause is used to “Filters out unwanted data”?

a)

FROM

b)

SELECT

c)

ORDER BY

d)

WHERE

16.

Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.

a)

Select first_name from employess where first_name LIKE '%A';

b)

Select first_name from employess where first_name LIKE "'A'%";

c)

Select first_name from employess where first_name LIKE 'A%';

d)

Select first_name from employess where first_name LIKE '%A%';

17.

Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.

a)

Select first_name from employess where first_name LIKE '%A';

b)

Select first_name from employess where first_name LIKE "'A'%";

c)

Select first_name from employess where first_name LIKE 'A%';

d)

Select first_name from employess where first_name LIKE '%A%';

18.

Which one of the following uniquely identifies the tuples/tows in a relation ?

a)

Secondary key

b)

Primary key

c)

Composite key

d)

Foreign key

19.

What is the full form of DDL ?

a)

Dynamic data language

b)

Detailed data language

c)

Data definition language

d)

Data derivation language

20.

Which of the following keywords will you use to display unique values of the column dept_name ?


SELECT ______ dept_name from COMPANY;

a)

All

b)

distinct

c)

from

d)

name

21.

What will be the output for :-


SELECT LENGTH("EMPLOYEE");

a)

10

b)

8

c)

EMPLOYEE

d)

1