Professional Documents
Culture Documents
PRACTICAL ASSIGNMENT
Use Table 1 and Table 2 below to answer the questions that follow.
A. Write the SQL query to grant delete, insert, and update privilege on PersonalRecord
table to the user SCOTT
B. As a user with an administrative right, write the SQL query to change the password of
the user SCOTT to GOOD
C. Write an SQL command used to create the PersonalRecord table where IndexNum is
the Primary key.
D. Write the appropriate SQL command to insert the first three records into the
std_persoanl table.
E. Tabulate the result if the following SELECT query operations are used to query the
database:
i. SELECT p.Index_Num AS Index_Number, CONCAT(p.Surname ‘ ‘
p.Othernames) AS Fullname, a.Course AS Subject, a.Marks AS Marks
FROM PersonalRecord p JOIN AcademicRecord a
ON (p.Index_Num=a.Index_Num)
WHERE a.Marks<81;
F. Write an SQL query to change the Gender of Konadu Esther from ‘F’ to ‘M’ in the
PersonalRecord table.
G. Write an SQL query to add a new column or field, DOB to the PersonalRecord table.
H. Write an SQL query to completely delete the AcademicRecord table.