Create
CREATE TABLE Students (
StudentID int,
Name varchar(255),
Age int
);
Alter
ALTER TABLE Students
ADD COLUMN Grade int;
ALTER TABLE statement is used to add, delete, or modify columns in an existing table.ALTER TABLE statement is also used to add and drop various constraints on an existing table.Drop
DROP TABLE Students;
Truncate
TRUNCATE TABLE Students;
Rename
RENAME TABLE Students TO Pupils;
Select
SELECT * FROM Students;
Insert
INSERT INTO Students (StudentID, Name, Age)
VALUES (1, 'John Doe', 20);
Update
UPDATE Students
SET Age = 21
WHERE StudentID = 1;
Delete
DELETE FROM Students
WHERE StudentID = 1;
Grant
GRANT SELECT ON Students TO User1;
Revoke
REVOKE SELECT ON Students FROM User1;
Commit
COMMIT;
Rollback
ROLLBACK;
Savepoint
SAVEPOINT Savepoint1;