SQL STUDY | FROM QUESTION TO PERFECTION| STUDY
WITH CONFIDENCE!
Course Code:
Course Title:
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 70%
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
, What does SQL stand for and what is it used for? Answer: Structured Query Language and it is
used to manage relational databases and perform various operations on the data in them.
What is a relational database and non relational database? Answer: Relational database -
represents a collection of related (two dimensional) tables.
Non-relational database - stores data in a non-tabular form, and tends to be more flexible than
the traditional, SQL-based, relational database structures
What is a query? Answer: is just a statement which declares what data we are looking for,
where to find it in the database, and how to transform it before it is returned.
what word is used to retrieve data from the database? Answer: SELECT
What is SELECT DISTINCT? Answer: Is a statement that is used for returning only distinct
DIFFERENT values. So it won't return a value more than once
What is WHERE in SQL? Answer: It is a where clause used to filter records. It is used to
extract only those records that fulfill a specified condition.
What can the WHERE clause be combined with? Answer: It can be combined with AND, OR,
NOT operators.
What are the AND, OR, NOT operators? Answer: The AND and OR operators are used to filter
records based on more than one condition:
The AND operator displays a record if all the conditions separated by AND are TRUE.
The OR operator displays a record if any of the conditions separated by OR is TRUE.
The NOT operator displays a record if the condition(s) is NOT TRUE.
What is ORDER BY in SQL? Answer: The ORDER BY keyword is used to sort the result-set
in ascending or descending order.
The ORDER BY keyword sorts the records in ascending order by default. To sort the records in
descending order, use the DESC keyword.
What is the INSERT INTO Statement used for? Answer: The INSERT INTO statement is used
to insert new records in a table.
How would you use INSERT INTO? Answer: INSERT INTO nameoftable
VALUES
(whatever the values are);
How would you insert data into specified columns? Answer: INSERT INTO
nameoftable(specified columns)
VALUES
APPHIA – Crafted with Care and Precision for Academic Excellence.
2
WITH CONFIDENCE!
Course Code:
Course Title:
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 70%
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
, What does SQL stand for and what is it used for? Answer: Structured Query Language and it is
used to manage relational databases and perform various operations on the data in them.
What is a relational database and non relational database? Answer: Relational database -
represents a collection of related (two dimensional) tables.
Non-relational database - stores data in a non-tabular form, and tends to be more flexible than
the traditional, SQL-based, relational database structures
What is a query? Answer: is just a statement which declares what data we are looking for,
where to find it in the database, and how to transform it before it is returned.
what word is used to retrieve data from the database? Answer: SELECT
What is SELECT DISTINCT? Answer: Is a statement that is used for returning only distinct
DIFFERENT values. So it won't return a value more than once
What is WHERE in SQL? Answer: It is a where clause used to filter records. It is used to
extract only those records that fulfill a specified condition.
What can the WHERE clause be combined with? Answer: It can be combined with AND, OR,
NOT operators.
What are the AND, OR, NOT operators? Answer: The AND and OR operators are used to filter
records based on more than one condition:
The AND operator displays a record if all the conditions separated by AND are TRUE.
The OR operator displays a record if any of the conditions separated by OR is TRUE.
The NOT operator displays a record if the condition(s) is NOT TRUE.
What is ORDER BY in SQL? Answer: The ORDER BY keyword is used to sort the result-set
in ascending or descending order.
The ORDER BY keyword sorts the records in ascending order by default. To sort the records in
descending order, use the DESC keyword.
What is the INSERT INTO Statement used for? Answer: The INSERT INTO statement is used
to insert new records in a table.
How would you use INSERT INTO? Answer: INSERT INTO nameoftable
VALUES
(whatever the values are);
How would you insert data into specified columns? Answer: INSERT INTO
nameoftable(specified columns)
VALUES
APPHIA – Crafted with Care and Precision for Academic Excellence.
2