
create, alter, drop
select, insert, update, delete
grant, revoke commit, rollbackBEGIN WORK//do work here//commit or rollback at the end of the workCOMMITROLLBACK
CREATE TABLE employee (
id INT NOT NULL AUTO_INCREMENT,
firstName VARCHAR(100) NOT NULL,
lastName VARCHAR(100) NOT NULL,
hiredDate DATE,
salary INT,
PRIMARY KEY ( id )
);
select <%EXPRESSIONS%> from <%TABLE REFERENCES%>
select * from employee;
select * from employee where salary > 1000;
select * from employee order by salary desc;
select count(*) from employee;select sum(salary) from employee;
select sum(salary) from employee group by departamentId; insert into employee(id, firstName, lastName) values ( 1, "Posa", "Bogdan");
update employee set salary = 1000;
update employee set salary = 1000 where id = 1;
delete from employee;
delete from employee where id = 1;
begin work;
delete from employee;
select * from employee;
rollback; select * from employee e
join departament d on d.id = e.departamentId select * from employee e left join departament d on d.id = e.departamentId; select * from employee e
right join departament d on d.id = e.departamentId;