wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MySQL Grade XII IP

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

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

2.

What is the full form of DDL ?

a)

Dynamic data language

b)

Detailed data language

c)

Data definition language

d)

Data derivation language

3.

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

4.

Which of the following SQL commands retrieves data from table(s)?

a)

update

b)

select

c)

insert

d)

delete

5.

What will be the output for :-


SELECT LENGTH("EMPLOYEE");

a)

10

b)

8

c)

EMPLOYEE

d)

1

6.

What will be the output for :-


SELECT ROUND(153.669,2);

a)

153.6

b)

153.7

c)

153.67

d)

153.66

7.

Total number of rows/records/horizontal arrangement in a table is called:

a)

Degree

b)

Records

c)

Integer

d)

Cardinality

8.

Which SQL statement is used to delete an existing row ?

a)

DROP

b)

REMOVE

c)

DELETE

d)

UPDATE

9.

Which of the following is not an aggregate function?

a)

DATE

b)

AVG

c)

COUNT

d)

MAX

10.

Which of the following functions returns the position of a substring in a given string?

a)

MID

b)

INSTR

c)

SUBSTR

d)

CHAR

11.

What will be returned by the given query?

SELECT INSTR("INDIA", "DI");

a)

2

b)

3

c)

-2

d)

-3

12.

What will be returned by the given query?

SELECT concat("It", "was", "ok");

a)

"It was ok"

b)

"Itwasok"

c)

"Itwas ok"

d)

"Tt wasok"

13.

What will be returned by the given query?

SELECT truncate(15.79, -1), truncate(15.79, 0), truncate(15.79, 1);

a)

15 15 15.7

b)

10 15.7 15.9

c)

10 15 15.7

d)

10 10 15.9

14.

What will be returned by the given query?

SELECT month('2020-05-11');

a)

5

b)

11

c)

May

d)

November

15.

What is the full form of SQL?

a)

Structured Query Language

b)

Structured Query List

c)

Simple QueryLanguage

d)

None of these

16.

Which operator performs pattern matching?

a)

Between Operator

b)

Like Operator

c)

Exists Operator

d)

None of these

17.

Which operator test the column for absence of data?

a)

Not operator

b)

and operator

c)

is null operator

d)

None of these

18.

In a table there are 3 rows and 5 columns. what is the degree of the table?

a)

5

b)

3

c)

0

d)

none of these

19.

Which of the following is not a DML command?

a)

Update

b)

Insert into

c)

Delete

d)

Create Table

20.

Which SQL command is used to remove rows from the table customer?

a)

Drop from customer ;

b)

Update from customer;

c)

remove from customer ;

d)

Delete from customer where condition ;

21.

SELECT * FROM sales WHERE amount > 200.

a)

the query will display all the sales records with amounts starting from 200 and above

b)

the query will display all the sales records with amounts less than 200

c)

the query will display all the sales records with amounts greater than 200

d)

the query will output sales records with the amount equal to 200.

22.

SELECT * FROM sales WHERE amount > 200.

a)

the query will display all the sales records with amounts starting from 200 and above

b)

the query will display all the sales records with amounts less than 200

c)

the query will display all the sales records with amounts greater than 200

d)

the query will output sales records with the amount equal to 200.

23.

Which is the default order of sort in ORDER BY clause?

a)

ascending

b)

descending

24.

What could be the correct datatype for 'H.NO. 234, SEC-14' data

a)

Date

b)

int

c)

varchar

d)

decimal

25.

Which operator is used to match column values against a list of values?

a)

between

b)

IN

c)

Like

d)

Is Null