5.1) For each of the following statements, show whether the statement is correctly executed or not (assume that the statements are executed in order, which means that if a statement is correctly executed, its effect is reflected in the following statement). If you say the statement is not executed, explain why. a. INSERT INTO Students VALUES (3, ‘Ellen’); b. INSERT INTO Students VALUES (6, ‘Ellen’); c. INSERT INTO Register VALUES (1, 2);
5.1) For each of the following statements, show whether the statement is correctly executed or not (assume that the statements are executed in order, which means that if a statement is correctly executed, its effect is reflected in the following statement). If you say the statement is not executed, explain why.
a. INSERT INTO Students VALUES (3, ‘Ellen’);
b. INSERT INTO Students VALUES (6, ‘Ellen’);
c. INSERT INTO Register VALUES (1, 2);
d. INSERT INTO Courses VALUES (5, ‘Systems’);
e. INSERT INTO Register VALUES (6, 5);
f. INSERT INTO Register VALUES (3, 5);
The current situation here is to check whether thr following statement is executed are not.
From the statement we came to know that are 3tables (student, courses and register). Each table contains the following fields such as student (student id, student name), courses (number of student, course name) and register (subject1mark, subject2marks).
The syntax to insert the record into the table is as follows:
INSERT INTO table_name
VALUES (value1, value2, value3, ...);
a. INSERT INTO Students VALUES (3, ‘Ellen’);
This statement is executed. Here we are going to insert the student id as 3 and name as 'Ellen' in the students table.
b. INSERT INTO Students VALUES (6, ‘Ellen’) ;
This statement is also executed.Here we are going to insert the student id as 6 and name as 'Ellen' in the students table.The student name same in both the statements (a, b). It doesn't cause any issues because there's a possibility for students having same name.
C. INSERT INTO Register VALUES (1, 2);
This statement is also executed.Here we are going to insert the marks such as subject 1mark as 1 and subject 2mark as 2 in the register table.
Step by step
Solved in 2 steps