Inserting, Updating, and Deleting
INSERT
statement. Think of it as adding a new row to your spreadsheet.
product_id | product_name | category | price | stock |
---|---|---|---|---|
6 | Fitness Band | Fitness | 3500 | 20 |
UPDATE
statement comes in.
product_name | stock |
---|---|
Yoga Mat | 80 |
DELETE
statement.
WHERE
Clause is not mandatory in DELETE
statement. But without the WHERE
clause you will end up removing all the rows from the table.INSERT
to add new rows to your tables.UPDATE
to modify existing data, but always double-check your WHERE
clause to avoid accidental updates.DELETE
to remove rows, but be cautiousâdeleting without a WHERE
clause removes all rows in the table.