CJCoding With Joseph
15free / daySign inCreate account

A Course With Default Credits

Add a course called 'Web Development' with code 'CS240', in department 1 (Computer Science), at level 200. Name only those four columns in your INSERT: credits must come from the table's DEFAULT (3), and instructor_id, max_seats, room, semester and fee stay NULL because you never mention them. The new row gets id 15; the other 14 courses are untouched.

Expected result:

courses after your statements: 15 rows
+----+---------+-----------------------------+---------------+---------------+---------+-------+-----------+-------+-------------+-----+
| id | code    | title                       | department_id | instructor_id | credits | level | max_seats | room  | semester    | fee |
+----+---------+-----------------------------+---------------+---------------+---------+-------+-----------+-------+-------------+-----+
|  1 | CS101   | Introduction to Programming |             1 |             1 |       3 |   100 |        60 | T-100 | Fall 2025   | 650 |
|  2 | CS201   | Data Structures             |             1 |             2 |       3 |   200 |        40 | T-102 | Winter 2026 | 650 |
|  3 | CS230   | Databases                   |             1 |             3 |       3 |   200 |        35 | T-104 | Winter 2026 | 700 |
|  4 | CS310   | Operating Systems           |             1 |             1 |       4 |   300 |        30 | T-106 | Fall 2025   | 820 |
|  5 | MATH110 | Calculus I                  |             2 |             4 |       4 |   100 |        80 | G-001 | Fall 2025   | 600 |
+----+---------+-----------------------------+---------------+---------------+---------+-------+-----------+-------+-------------+-----+
(showing 5 of 15 rows)
Hints3 available
Topics:
INSERT, UPDATE & DELETE
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)

Results

Run your SQL to see every statement's output here, then how it compares with the expected answer.

Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns — or open the database browser on the left.