wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL basics MBA

Total questions: 51

Worksheet time: 27mins

Name
Class
Date
1.

select all DDL commands are:-

a)

UPDATE

b)

ALTER

c)

DROP

d)

DELETE

2.

Which join would you use to create a query that returns ALL data from Table B and only those on Table A that match?

a)

Inner Join

b)

Left Join

c)

Right Join

d)

Full Outer Join

3.

What does the acronym "RDBMS" stand for, and how does it differ from a regular database?

a)

Relational Database Management System, stores data in tables with relationships

b)

Random Database Management System, organizes data without any specific structure

c)

Redundant Database Management System, duplicates data for backup purposes

d)

Resourceful Database Management System, efficiently manages system resources

4.

The “AS” keyword is optional while specifying an alias for a field name in a select statement

a)

True

b)

False

5.

Which of the following is not a type of SQL statement?

a)

Data Manipulation Language (DML)

b)

Data Definition Language (DDL)

c)

Data Control Language (DCL)

d)

Data Communication Language (DCL)

6.

A_____ is a query that retrieves rows from more than one table or view

a)

Start

b)

End

c)

Join

d)

All of the above

7.

If you were wanting to filter data, which clause would you use?

a)

Where

b)

Order by

c)

From

d)

Select

8.

Which statement is used to extract data from a database?

a)

Extract

b)

Get

c)

Open

d)

Select

9.

Relational Database

a)

NoSQL

b)

SQL

10.

Which of the following is not a NoSQL database?

a)

Cassandra

b)

MongoDB

c)

SQL Server

d)

None of the above

11.

Which join will exclude rows that don’t match in either table?

a)

LEFT

b)

RIGHT

c)

INNER

d)

ALL OF THEM

12.

Which join type will include all rows from the left table, even if there’s no match in the right table?

a)

LEFT

b)

RIGHT

c)

INNER

d)

ALL OF THEM

13.

Which type of join can show NULL values for rows without a match?

a)

LEFT

b)

RIGHT

c)

INNER

d)

ALL OF THEM

14.

If we use a LEFT JOIN, which data will we see in the result?

a)

Only data that matches in both tables

b)

All data from the left table and matching data from the right table

c)

Only data from the right table

d)

All data from both tables

15.

Which type of join will only show data that is matched in both tables?

a)

LEFT

b)

RIGHT

c)

INNER

d)

OUTER

16.

Which word is missing from the following SQL statement?


Select * table_name

a)

With

b)

Where

c)

From

d)

And

17.

What does the "S" in SQL stand for?

a)

Several

b)

Structured

c)

Syntax

d)

Semi-precise

18.

SELECT DISTINCT Country FROM Customers;

The above statement provides the list of countries in the table 'Customers'.

a)

True

b)

False

19.

Select the statement to display all data from a table that contains the columns index_number, customer_name, customer_address and phone_number

a)

SELECT index_number FROM table;

b)

SELECT index_number, customer_name, customer_address, phone_number FROM table;

c)

SELECT * FROM table;

d)

None of the above

20.

Which of the following is used to delete a table?

a)

SELECT

b)

DELETE

c)

DROP

d)

ALTER

21.

SELECT statement is used to ..

a)

Write data to table

b)

Update data to table

c)

Read data from table

d)

Delete from table

22.

Semicolon (;) is the standard way to separate each SQL statement in database systems.

a)

True

b)

False

23.

Semicolon (;) is the standard way to separate each SQL statement in database systems.

a)

True

b)

False

24.

RDBMS stands for?

a)

Relational Database Management System

b)

Rational Database Management System

c)

Relational Data Management System

d)

Relational Database Management Society

25.

What does DML stand for in SQL?

a)

Data Manipulation Language

b)

Database Modification Language

c)

Data Modeling Language

d)

Data Management Language

e)

Data Merge Language

26.

In SQL, which of the following is used to retrieve the lowest value in a column?

a)

MIN()

b)

MAX()

c)

SUM()

d)

COUNT()

e)

AVG()

27.

Which SQL command is used to modify the structure of an existing table?

a)

ALTER TABLE

b)

UPDATE TABLE

c)

MODIFY TABLE

d)

CHANGE TABLE

e)

RENAME TABLE

28.

In SQL, which clause specifies the source tables for the query?

a)

FROM

b)

WHERE

c)

SELECT

d)

JOIN

e)

WITH

29.

What is the purpose of the INNER JOIN in SQL?

a)

To combine rows from two or more tables based on a related column

b)

To remove duplicates from a result-set

c)

To return rows that do not have matching values in both tables

d)

To select columns from a single table

e)

To modify the structure of a table

30.

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

a)

UPDATE

b)

MODIFY

c)

ALTER

d)

CHANGE

e)

RENAME

31.

In a SELECT query, what does DISTINCT do?

a)

Returns only unique values

b)

Filters rows based on a condition

c)

Groups rows based on a column

d)

Deletes duplicate rows

e)

Sorts the result-set in descending order

32.

Which clause is used to sort the result-set in SQL?

a)

ORDER BY

b)

GROUP BY

c)

SORT

d)

LIMIT

e)

FILTER

33.

Which of the following SQL aggregate functions returns the number of selected rows?

a)

COUNT(*)

b)

SUM()

c)

AVG()

d)

MIN()

e)

MAX()

34.

What does the WHERE clause do in SQL?

a)

Specifies the selection condition for rows

b)

Specifies the order of the output

c)

Specifies the table from which to retrieve data

d)

Joins two tables together

e)

Sorts the output

35.

Which SQL command is used to delete a table?

a)

DROP TABLE

b)

DELETE TABLE

c)

REMOVE TABLE

d)

TRUNCATE TABLE

e)

ERASE TABLE

36.

What is the main purpose of the SELECT clause in SQL?

a)

To specify the attributes to be shown in the result table

b)

To specify the source tables to access

c)

To define the condition for row selection

d)

To delete data from the table

e)

To count the number of rows

37.

What keyword is used to select all columns from a table in SQL?

a)

*

b)

ALL

c)

#

d)

%

e)

$

38.

Which SQL statement is used to insert new data into a database?

a)

INSERT INTO

b)

ADD NEW

c)

PUT

d)

CREATE

e)

UPDATE

39.

In SQL, which clause is used to filter records?

a)

WHERE

b)

SELECT

c)

FROM

d)

ORDER BY

e)

LIMIT

40.

Which SQL statement is used to select data from a database?

a)

SELECT

b)

UPDATE

c)

DELETE

d)

INSERT

e)

MODIFY

41.

What does SQL stand for?

a)

Structured Query Language

b)

Simple Query Language

c)

Structured Question Language

d)

Standard Query Language

e)

Semantic Query Language

42.

from the following option select the wrong one.

a)

AND

b)

OR

c)

NOT

d)

greater than equal to

43.

_____ is used to filter out the data by applying condition on grouped data.

a)

where

b)

from

c)

having

d)

order by

44.

____ is the clause which we use to choose the required data in the OUTPUT from the original table.

a)

select

b)

where

c)

group by

d)
45.

drop, truncate, create are the commands of DDL?

a)

True

b)

False

46.

Which option is not the command of DML ?

a)

insert

b)

update

c)

alter

d)

delete

47.

_____ is the logical skeleton of the database

a)

Views

b)

Tables

c)

database

d)

schema

48.

A _____ is a place where we can used to store huge amounts of structured data from different databases in a one place.

a)

database

b)

data lake

c)

cloud

d)

data warehouse

49.

Is images and videos being the example of the Structured data?

a)

Yes

b)

No

50.

What kind of database we and SQL will be mostly deal with ?

a)

Hierarchical Database

b)

Network Database

c)

Relational Database

d)

Object oriented database

51.

Which is not the sub language of SQL?

a)

DDL

b)

DML

c)

DCL

d)

PCL