7. What is the purpose of the SQLSELECTDISTINCTstatement?
a) It is used to delete duplicate records from a table.
b) It is used to select only unique values from a specified column.
c) It is used to select records based on a specific condition.
d) It is used to sort the records in a table in descending order.
8. Which of the following is NOT a type of SQLjoin?
a) Inner join.
b) Full outer join.
c) Left outer join.
d) Parallel join.
9. What is the purpose of the SQLGROUPBYclause?
a) To sort the results of a query.
b) To filter records based on a condition.
c) To perform aggregate functions on groups of data.
d) To join multiple tables together.
10. Which SQLcommand is used to modify existing data in a database?
a) ALTER
b) UPDATE
c) MODIFY
d) CHANGE
Question 2
[10 marks]
Indicate whether the following statements are True or False in your answer booklet.
ID StatemenVDescrlptlon
:,
,;
"·
;
True
1 DCLis used to update the database with new records.
2 A referential integrity constraint specifies that the existence of
check constraints in the same or another table.
3 Character strings and dates in the WHERE clause must be
enclosed in single quotation marks.
4 In SQL, the UNION operator is used to combine the results of
two or more SELECTstatements into a single result set.
5 In a relational database, a table is also known as a tuple.
6 Data redundancy is beneficial in a database because it
improves data integrity.
7 A transaction in a database is a single unit of work that must be
completed entirely or not at all.
8 All aggregate functions except COUNT(*) ignore null values in
their input collection.
9 The NATURALJOIN clause is based on columns in the two
tables that have the same name and datatype.
10 DESCcan be used with the order by clause to sort a table in
descending order.
False
Page I 2