0% found this document useful (0 votes)
2 views

mysql2 (1)

The document contains SQL commands to create and populate several tables related to employees, departments, salaries, projects, countries, clients, and project details. It defines the structure of each table and includes multiple insert statements to add data into these tables. The data includes employee information, department details, salary records, project durations, and client associations.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

mysql2 (1)

The document contains SQL commands to create and populate several tables related to employees, departments, salaries, projects, countries, clients, and project details. It defines the structure of each table and includes multiple insert statements to add data into these tables. The data includes employee information, department details, salary records, project durations, and client associations.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

create table Emplyoee

(Empid int, EmpName varchar(45), Department varchar(5), ContactNo bigint, EmailId


varchar(45), EmpHeadId int);

create table EmpDept


(DeptId varchar(5), DeptName varchar(30), Dept_off varchar(10), DeptHead int);

create table Salary


(EmpId int, Salary bigint, IsPermanent varchar(3));

create table Project


( ProjectId varchar(5), Duration int);

create table Country


(Cid varchar(4), Cname varchar(20));

CREATE TABLE ClientTable


(ClientId varchar(5), ClientName varchar(20), Cid varchar(5));

create table ProjectDetails


(EmpId int, ProjectId varchar(5), clientId varchar(5), StartYear int, EndYear int);

insert into project values('P-1',23);


insert into project values('P-2',15);
insert into project values('P-3',45);
insert into project values('P-4',2);
insert into project values('P-5',30);

insert into country values('C-1','India');


insert into country values('C-2','USA');
insert into country values('C-3','China');
insert into country values('C-4','Pakistan');
insert into country values('C-5','Russia');

insert into clienttable values ('C-1','CL-1','ABC Group');


insert into clienttable values ('C-2','CL-2','PQR');
insert into clienttable values ('C-3','CL-3','XYZ');
insert into clienttable values ('C-4','CL-4','Tech Altum');
insert into clienttable values ('C-5','CL-5','MNP');

insert into projectDetails values(101,'P-1','CL-1',2010,2010);


insert into projectDetails values(102,'P-2','CL-2',2010,2012);
insert into projectDetails values(103,'P-1','CL-3',2013,null);
insert into projectDetails values(104,'P-4','CL-1',2014,2015);
insert into projectDetails values(105,'P-4','CL-5',2015,null);

insert into salary values


(101,2000,'YES'),
(102,10000,'YES'),
(103,5000,'NO'),
(104,1900,'YES'),
(105,2300,'YES');
insert into empdept values('E-101','HR','Monday',105);
insert into empdept values('E-102','Developement','Tuesday',101);
insert into empdept values('E-103','House Keeping','saturday',103);
insert into empdept values('E-104','Sales','Sunday',104);
insert into empdept values('E-105','Purchase','Tuesday',104);

insert into employee values(101,'Aishwarya','E-


101','9897654263','[email protected]',105);
insert into employee values(102,'Sagar','E-
104','9873652534','[email protected]',103);
insert into employee values(103,'Anand','E-
101','9853518263','[email protected]',101);
insert into employee values(104,'Prakash','E-
102','9863856725','[email protected]',105);
insert into employee values(105,'Aakash','E-
101','9857362537','[email protected]',102);

You might also like