Section A - Theory (10 Marks)
Question 1
Choose True or False
[10 Marks]
No
Questions
True (T)
1 A stored procedure in SQL Server can encapsulate multiple
SQL statements to perform a specific task.
2 The IF statement in SQL Server is used to manage the flow of
execution in stored procedures or batches.
3
Stored procedures can return more than one result set in SQL
Server.
4 SQL Server allows stored procedures to have both input and
output parameters.
5 Triggers in SQL Server execute automatically in response to
events like INSERT,UPDATE,or DELETE.
6
The FETCHstatement retrieves the next row from the cursor's
result set in SQL Server.
7
The DECLARECURSORstatement specifies the attributes of a
cursor in SQL Server.
8 SQLServer utilizes a TRY...CATCHblock for managing
exceptions.
9
Parameters in a SQL Server stored procedure must match the
data types of the corresponding columns in the database.
10 The ERRORstatement is used in SQLServer to raise exceptions
explicitly.
False (F)
Section B - Practical (90 Marks)
Please utilise SQL Server Management Studio (SSMS)on your computer for this section.
Instructions: Copy and paste your final code into Notepad and save it to the exam folder on E-
Learning. Ensure that you number your code appropriately. Refer to the scenario and table
below to aid your understanding of the preceding questions.
Scenario:
Design and develop an application aimed at providing career guidance and counseling. This
application will focus on enhancing an individual's self-awareness, exploring educational and
occupational options, and facilitating career planning. Its purpose is to help individuals make
informed educational and occupational decisions and implement those choices effectively.
For this application, we can create a table named UserProfiles to store information about
individuals using the career guidance application. Here's a suggested structure for the
UserProfiles table:
2