Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started