fix(curriculum): clarify error when inserting without columns (#65133)

Co-authored-by: Jeevankumar-S <jeevenkumar2003@email.com>
This commit is contained in:
Jeevankumar S
2026-01-14 10:20:02 +00:00
committed by GitHub
co-authored by Jeevankumar-S
parent f66ec56ab6
commit 071374ca02
@@ -47,7 +47,11 @@ INSERT INTO dogs
VALUES ('Gino', 3);
```
This is valid too, but it's more prone to errors because the values are assigned to the columns based on their order.
This syntax is valid SQL, but it is error-prone.
Since values are assigned based on column order, PostgreSQL will try to insert `'Gino'` into the `id` column, which expects an integer. This results in an error such as `invalid input syntax for type integer`.
For this reason, it is safer to explicitly specify the column names when inserting data.
You can also insert multiple records in the same SQL command by separating them with a comma.