Question: Compulsory Task 1 Answer the following questions: Go to the JDoodle Online SQL IDE. This is where you can write and test your SQL code
Compulsory Task
Answer the following questions:
Go to the JDoodle Online SQL IDE. This is where you can write and test your SQL code using their databases. Once you are happy with your code, paste it into a text file and save the file in your task folder as Student.txt
Write the SQL code to create a table called Student. The table structure is summarised in the table below.
Note that STUNUM must be set up as the primary key.
Attribute Name
Data Type
STUNUM
CHAR
STUSNAME
VARCHAR
STUFNAME
VARCHAR
STUINITIAL
CHAR
STUSTARTDATE
DATE
COURSECODE
CHAR
PROJNUM
INT
After you have created the table, write the SQL code to enter the following rows of data into the table as below:
STUN UM
STU SNAME
STU FNAME
STU INITIA L
STU
STARTDATE
COURSE CODE
PROJ NUM
Snow
Jon
E
Stark
Arya
C
Lanniste r
Jamie
C
Lanniste r
Cercei
J
Greyjoy
Theon
I
Tyrell
Margaer y
Y
Baratheo n
Tommen
R
Write the SQL code that will return all records which have a COURSECODE of
Write the SQL code to change the course code to for the person whose student number is
Write the SQL code to delete the row of the person named Jamie Lannister, who started on September whose course code is and project number is Use logical operators to include all of the information given in this problem.
Write the SQL code that will change the PROJNUM to for all those students who started before January and whose course code is at least
Write the SQL code that will delete the Student table entirely.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
