Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SEQUELVERSE

Total questions: 30

Worksheet time: 10mins

Name
Class
Date
1.

BLOB in SQL stands for?

a)

 Binary Large Object


b)

Big Logic Object

c)

Binary Logic Object


d)

None of these.

2.

Which data type of SQL is used to store a JSON object?

a)

NVarchar

b)

BLOB

c)

Char

d)

Int

3.

SQL database follows which of the following principles?

a)

AGILE

b)

ACID

c)

SQL

d)

DBMS

4.

What is the difference if we truncate a table and if we drop a table?

a)

In both cases, the table is deleted.

b)

In both cases, the data is deleted.

c)

In truncate, the data is deleted and in drop the whole table is deleted.

d)

In truncate, the table is deleted while when the table is dropped the data is  deleted.

5.

Below are some constraint classes of SQL given. Find the one which is not a constraint class in SQL.

a)

UNIQUE

b)

NOT NULL

c)

IFNULL

d)

NULL

6.

Which of the following is not a built-in function in SQL?

a)

DATE_ADD( )

b)

DATE_SUB( )

c)

DATE_DIFF( )

d)

DATE_FORMAT( )

7.

Which SQL constraint do we use to set some value to a field whose value has not been added explicitly?

a)

UNIQUE

b)

NOT NULL

c)

DEFAULT

d)

CHECK

8.

Which of the following allows you to uniquely identify a tuple?

a)

Schema

b)

Attribute

c)

Super Key

d)

Domain

9.

When the SQL query is executed the result is?

a)

A blank screen

b)

A table

c)

A row

d)

All of these

10.

Which of the following is true about a cursor in SQL?

a)

The cursor can perform all the CRUD operations.

b)

It is read-only.

c)

Cursors are objects of the query.

d)

Cursors are created automatically.

11.

Which of the below is an invalid query?

a)

SELECT Unique(name) FROM DataFlair;

b)

SELECT * FROM DataFlair Where experience!=0;

c)

Select name FROM DataFlair;

d)

None of these

12.

Which of the following join extracts data of matching rows from both tables?

a)

Full Outer Join

b)

Left Join

c)

Right Join

d)

None of these

13.

Which of the following shows comment in SQL?

a)

/* This is a comment. */

b)

# This is a comment

c)

% This is a comment

d)

& This is a comment

14.
  1. What happens when no value is inserted in an ENUM list?

a)

nothing will happen

b)

the code will crash

c)

blank value is inserted

d)

None of the above

15.

Which of the following commands are a part of Data Control Language?

a)

Revoke

b)

Grant

c)

Both A and B

d)

None of the above

16.

Which of the following matches the definition given below: It is an artificial key that aims to uniquely identify each record.

a)

Primary Key

b)

Surrogate Key

c)

Foreign Key

d)

Composite Key

17.

Which of the following SQL functions compares the similarities of 2 strings and returns the result as a 4 character code?

a)

SOUNDEX

b)

DIFFERENCE

c)

CONCAT

d)

None of the above

18.

Which of the following functions do we use to get a specified day of the month for a given date?

a)

DAY

b)

DATEPART

c)

GETDATE

d)

CURRENT_TIMESTAMP

19.

When is the wildcard in WHERE clause used?

a)

An exact match is necessary for a CREATE statement.

b)

An exact match is not possible in a SELECT statement.

c)

An exact match is necessary for a SELECT statement.

d)

None of the above.

20.

Which of the following is true concerning triggers?

a)

You do not create them with SQL.

b)

They execute against only some applications that access a database.

c)

They have an event, condition, and action.

d)

They cannot cascade (cause another trigger to fire).

21.

Embedded SQL is which of the following?

a)

The process of making an application capable of generating specific SQL code on the fly.

b)

Hard-coded SQL statements in a program language such as Java

c)

Hard-coded SQL statements in a procedure.

d)

Hard-coded SQL statements in a trigger.

22.
  1. SELECT * FROM employees WHERE salary BETWEEN 50000 AND 70000;

What range of salaries will be included in the result?


a)

Salaries less than 50000.

b)

Salaries between 50000 and 70000, inclusive.

c)

Salaries greater than 70000.

d)

Salaries exactly equal to 50000 or 70000.

23.

Which of the following query returns the results in ascending order of the experience column?

a)

SELECT experience, name FROM DataFlair;

b)

SELECT name, experience FROM DataFlair;

c)

SELECT name, experience FROM DataFlair Order By name ASC;

d)

SELECT experience, name FROM DataFlair Order By experience ASC;

24.

What is the range of integers that can be held in the MEDIUMINT datatype of SQL?

a)

Signed numbers in the range of -8388608 to 8388607.

b)

Unsigned numbers in the range of 0 to 16777215.

c)

Both A and B.

d)

None of the above.

25.

SELECT * FROM products WHERE category IN ('Electronics', 'Clothing'); What does this query return?

a)

Products in either the 'Electronics' or 'Clothing' category

b)

Products in both the 'Electronics' and 'Clothing' categories.

c)

Products not in the 'Electronics' or 'Clothing' categories.

d)

An error because of the use of the IN clause

26.

null is used as a place holder for optional fields?

a)

NO

b)

YES

27.

Database development lifecycle is very important to the successful implementation of a database system ?

a)

NO

b)

YES

28.

WHERE clause is mandatory when using a SELECT command ?

a)

NO

b)

YES

29.

where clause is exactly having clause ?

a)

YES

b)

NO

30.

one to many relationship can only contain multiple entries of both primary and foreign keys?

a)

NO

b)

YES