0% found this document useful (0 votes)
29 views1 page

CrEmpDep New

The document contains SQL commands to create two tables, 'empl' and 'dept', and populate them with employee and department data. The 'empl' table includes fields such as employee number, name, job title, manager, hire date, salary, commission, and department number. The 'dept' table includes department number, name, and location, with sample data inserted for both tables.

Uploaded by

shaundejack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views1 page

CrEmpDep New

The document contains SQL commands to create two tables, 'empl' and 'dept', and populate them with employee and department data. The 'empl' table includes fields such as employee number, name, job title, manager, hire date, salary, commission, and department number. The 'dept' table includes department number, name, and location, with sample data inserted for both tables.

Uploaded by

shaundejack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

DROP TABLE IF EXISTS empl;

CREATE TABLE empl (


EmpNo Int(4) NOT NULL,
EName varchar(10) default NULL,
Job varchar(9) default NULL,
mgr int(4) default NULL,
HireDate date default NULL,
Sal decimal(7,2) default NULL,
Comm decimal(7,2) default NULL,
DeptNo int(2) default NULL
);

DROP TABLE IF EXISTS dept;

CREATE TABLE dept (


deptno int(2) default NULL,
dname varchar(14) default NULL,
loc varchar(13) default NULL
);

INSERT INTO Empl VALUES (8369,'SMITH','CLERK',8902,'1990-12-18',800.00,NULL,20);


INSERT INTO Empl VALUES (8499,'ANYA','SALESMAN',8698,'1991-02-
20',1600.00,300.00,30);
INSERT INTO Empl VALUES (8521,'SETH','SALESMAN',8698,'1991-02-
22',1250.00,500.00,30);
INSERT INTO Empl VALUES (8566,'MAHADEVAN','MANAGER',8839,'1991-04-
02',2985.00,NULL,20);
INSERT INTO Empl VALUES (8654,'MOMIN','SALESMAN',8698,'1991-09-
28',1250.00,1400.00,30);
INSERT INTO Empl VALUES (8698,'BINA','MANAGER',8839,'1991-05-01',2850.00,NULL,30);
INSERT INTO Empl VALUES (8882,'SHIAVNSH','MANAGER',8839,'1991-06-
09',2450.00,NULL,10);
INSERT INTO Empl VALUES (8888,'SCOTT','ANALYST',8566,1992-12-09,3000.00,NULL,20);
INSERT INTO Empl VALUES (8839,'AMIR','PRESIDENT',NULL,'1991-11-
18',5000.00,NULL,10);
INSERT INTO Empl VALUES (8844,'KULDEEP','SALESMAN',8698,'1991-09-
08',1500.00,0.00,30);
INSERT INTO Empl VALUES (8886,'ANOOP','CLERK',8888,'1993-01-12',1100.00,NULL,20);
INSERT INTO Empl VALUES (8900,'JATIN','CLERK',8698,'1991-12-03',950.00,NULL,30);
INSERT INTO Empl VALUES (8902,'FAKIR','ANALYST',8566,'1991-12-03',3000.00,NULL,20);
INSERT INTO Empl VALUES (8934,'MITA','CLERK',8882,'1992-01-23',1300.00,NULL,10);

INSERT INTO dept VALUES (10,'ACCOUNTING','NEW DELHI');


INSERT INTO dept VALUES (20,'RESEARCH','CHENNAI');
INSERT INTO dept VALUES (30,'SALES','KOLKATA');
INSERT INTO dept VALUES (40,'OPERATIONS', 'MUMBAI');

You might also like