0% found this document useful (0 votes)
12 views2 pages

SQL Practicles File

The document contains SQL statements to create tables for locations, departments, jobs, and employees. Data is inserted into these tables including location names, department names and IDs, job titles, employee names, IDs, hire dates and other information.

Uploaded by

cefewe1312
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)
12 views2 pages

SQL Practicles File

The document contains SQL statements to create tables for locations, departments, jobs, and employees. Data is inserted into these tables including location names, department names and IDs, job titles, employee names, IDs, hire dates and other information.

Uploaded by

cefewe1312
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/ 2

1.

create table LOCATION(Location_Id int Primary Key,Regional_Group varchar(50));

2.
INSERT INTO LOCATION
VALUES('122','New York');

INSERT INTO LOCATION


VALUES('123','Dallas');

INSERT INTO LOCATION


VALUES('124','Chicago');

INSERT INTO LOCATION


VALUES('167','Boston');

3.
create table department1(
department_id int,
name varchar(28),
location_id int
);

4.
insert into department1
values
(10,'accounting',122);

insert into department1


values(20,'research',124);

insert into department1


values(30,'sales',123);

insert into department1


values(40,'operations',167)

5.
CREATE TABLE JOB9(Job_ID int Primary Key,Funcation VARCHAR(40));

6.
INSERT INTO JOB9
VALUES('667','CLERK');

INSERT INTO JOB9


VALUES('668','STAFF');

INSERT INTO JOB9


VALUES('669','ANALYST');

INSERT INTO JOB9


VALUES('670','SALESPERSON');

INSERT INTO JOB9


VALUES('671','MANAGER');

INSERT INTO JOB9


VALUES('672','PRESIDENT');

7. CREATE TABLE EMPLOYEE99


(
Employee_Id int Primary Key,
Last_Name varchar(35),
First_Name varchar(45),
Middle_Name varchar(55),
Job_Id int,
Manager_Id int,
Hire_Date date,
salary int,
comm int,
department_id int
);

8.
insert into employee99
values(7369,'smith','john','Q',667,7902,'17-dec-84',800,null,20 );

insert into employee99


values(7499,'allen','kevin','J',670,7698,'20-feb-85',1600,300,30 );

insert into employee99


values(7505,'doyle','jean','K',671,7839,'04-apr-85',2850,null,30);

insert into employee99


values(7505,'doyle','jean','',671,7839,'15-may-85',2750,null,30);

insert into employee99


values(7506,'dennis','lynn','S',671,7839,'15-may-85',2750,null,30

insert into employee99


values(7507,'baker','leslie','D',671,7839,'10-jun-85',2200,null,40);

insert into employee99


values(7521,'wark','cynthia','D',670,7698,'22-feb-85',1250,500,30);

You might also like