SECTION B: PRACTICAL
[MARKS: 60]
The tables that will be used for the following section are: employees; job_history; jobs;
departments; countries; locations; regions; Semester Marks;
Question 1
[4 marks]
Write an SQL Statement to display the first_name, last_name of employees with the pattern 'I_x' in
their first name.
Question 2
[3 marks]
Write an SQL statement to retrieve the name of all the employees who are working in department
number 20 and 80.
Question 3
[7 marks]
Write an SQL Statement to display the first name, last name, department number and department
name, for all employees for departments 80 or 40.
Question 4
[3 marks]
Write an SQL Statement to create a view for all salesmen with columns salesman_id, name, and city.
Question 5
[3 marks]
Write an SQL Statement to update the city name which salesman_id is '5007'
Question 6
[9 marks]
Write a SQL statement to create a table named Semester_Marks using the fields (Student_Reg_No,
FirstName, LastName, Total_Marks, No Courses, Average_Mark) provided. Choose relevant data
types.
Question 7
[5 marks]
Write an SQL statement to populate three (3) rows to the table Semester_Marks (values of your
choice)
Question 8
[2 marks]
Write an SQL statement to confirm that your data has been added to the table.
Question 9
{2 marks]
Write an SQL statement to remove the table Semester_Marks.
Question 10
[5 marks]
Write an SQL statement to display the first name, last name, department number, and department
name for each employee.
Question 11
[6 marks]
The HR department needs a report that displays the last name, department number, and job ID of all
employees whose department location ID is 1700.
Question 12
[5 marks]