Write SQL statements to insert the remaining 4 rows of table 9.7 in table STUDENT.
| RollNumber | SName | SDateofBirth | GUID |
|---|---|---|---|
| 1 | Atharv Ahuja | 2003-05-15 | 444444444444 |
| 2 | Daizy Bhutia | 2002-02-28 | 111111111111 |
| 3 | Taleem Shah | 2002-02-28 | (no GUID) |
| 4 | John Dsouza | 2003-08-18 | 333333333333 |
| 5 | Ali Shah | 2003-07-05 | 101010101010 |
| 6 | Manika P. | 2002-03-10 | 466444444666 |
Table 9.7: STUDENT — the first record and the NULL-GUID record (Taleem Shah) are already inserted in the chapter text; insert the remaining 4.
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →The chapter inserts Atharv Ahuja (row 1) and Taleem Shah (the NULL-GUID example), so the four rows still needed are Daizy Bhutia, John Dsouza, Ali Shah and Manika P. Each is one INSERT INTO STUDENT (RollNumber, SName, SDateofBirth, GUID) VALUES (…);, using the exact GUID values printed in Table 9.7.
Which rows are still missing?
| RollNumber | SName | SDateofBirth | GUID (Table 9.7) | Already inserted? |
|---|---|---|---|---|
| 1 | Atharv Ahuja | 2003-05-15 | 444444444444 | Yes — in the chapter |
| 2 | Daizy Bhutia | 2002-02-28 | 111111111111 | No |
| 3 | Taleem Shah | 2002-02-28 | NULL | Yes — in the chapter (the NULL example) |
| 4 | John Dsouza | 2003-08-18 | 333333333333 | No |
| 5 | Ali Shah | 2003-07-05 | 101010101010 | No |
| 6 | Manika P. | 2002-03-10 | 466444444666 | No |
So exactly four INSERT statements are required. Table 9.7 prints every GUID directly — including John Dsouza's (333333333333) and Manika P.'s (466444444666) — so all four values can be typed straight from the table.
The four INSERT statements
INSERT INTO STUDENT (RollNumber, SName, SDateofBirth, GUID)
VALUES (2, 'Daizy Bhutia', '2002-02-28', 111111111111);
INSERT INTO STUDENT (RollNumber, SName, SDateofBirth, GUID)
VALUES (4, 'John Dsouza', '2003-08-18', 333333333333);
INSERT INTO STUDENT (RollNumber, SName, SDateofBirth, GUID)
VALUES (5, 'Ali Shah', '2003-07-05', 101010101010);
INSERT INTO STUDENT (RollNumber, SName, SDateofBirth, GUID)
VALUES (6, 'Manika P.', '2002-03-10', 466444444666);
MySQL replies to each with Query OK, 1 row affected. …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.