CREATE TABLE emp1 (
	empno INT NOT NULL,
	ename VARCHAR(15) NOT NULL,
	job VARCHAR(20) NOT NULL,
	mgr INT NULL,
	hiredate DATE NOT NULL,
	sal INT NOT NULL,
	comm INT NULL,
	deptno INT NOT NULL
);

CREATE TABLE dept1 (
	deptno INT NOT NULL,
	dname VARCHAR(15) NOT NULL,
	loc VARCHAR(12) NOT NULL
);


GRANT ALL ON emp1 TO PUBLIC;
GRANT ALL ON dept1 TO PUBLIC;


CREATE TABLE emp2 (
	empno INT NOT NULL,
	ename VARCHAR(15) NOT NULL,
	job VARCHAR(20) NOT NULL,
	mgr INT NULL,
	hiredate DATE NOT NULL,
	sal INT NOT NULL,
	comm INT NULL,
	deptno INT NOT NULL
);

CREATE TABLE dept2 (
	deptno INT NOT NULL,
	dname VARCHAR(15) NOT NULL,
	loc VARCHAR(12) NOT NULL
);


GRANT ALL ON emp2 TO PUBLIC;
GRANT ALL ON dept2 TO PUBLIC;


CREATE TABLE emp3 (
	empno INT NOT NULL,
	ename VARCHAR(15) NOT NULL,
	job VARCHAR(20) NOT NULL,
	mgr INT NULL,
	hiredate DATE NOT NULL,
	sal INT NOT NULL,
	comm INT NULL,
	deptno INT NOT NULL
);

CREATE TABLE dept3 (
	deptno INT NOT NULL,
	dname VARCHAR(15) NOT NULL,
	loc VARCHAR(12) NOT NULL
);


GRANT ALL ON emp3 TO PUBLIC;
GRANT ALL ON dept3 TO PUBLIC;


CREATE TABLE emp4 (
	empno INT NOT NULL,
	ename VARCHAR(15) NOT NULL,
	job VARCHAR(20) NOT NULL,
	mgr INT NULL,
	hiredate DATE NOT NULL,
	sal INT NOT NULL,
	comm INT NULL,
	deptno INT NOT NULL
);

CREATE TABLE dept4 (
	deptno INT NOT NULL,
	dname VARCHAR(15) NOT NULL,
	loc VARCHAR(12) NOT NULL
);


GRANT ALL ON emp4 TO PUBLIC;
GRANT ALL ON dept4 TO PUBLIC;
