DDLs
DDLs
explanations:
4. CONSTRAINTS Queries
5. INDEX Queries
6. VIEW Queries
7. SEQUENCE Queries
8. TRIGGER Queries
36.
CREATE TRIGGER trg_before_insert BEFORE INSERT ON Students FOR EACH ROW
SET NEW.Name = UPPER(NEW.Name);
41.
TRUNCATE Queries (Used to remove all records from a table but keep the
structure)
1. TRUNCATE TABLE Students; – Removes all data from the "Students" table.
2. TRUNCATE TABLE Employees; – Deletes all rows from the "Employees" table.
3. TRUNCATE TABLE Orders; – Clears all records in the "Orders" table.
4. TRUNCATE TABLE Products; – Removes all rows in the "Products" table while
keeping the schema.
5. TRUNCATE TABLE Customers RESTART IDENTITY; – Deletes all records and resets
identity columns.