Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views3 pages

Farris SQL

The document contains a series of SQL queries for managing employee data in a database. It includes commands for selecting, updating, deleting, and creating tables related to employee information. Key operations involve filtering by age, salary, and names, as well as modifying employee titles and records.

Uploaded by

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

Farris SQL

The document contains a series of SQL queries for managing employee data in a database. It includes commands for selecting, updating, deleting, and creating tables related to employee information. Key operations involve filtering by age, salary, and names, as well as modifying employee titles and records.

Uploaded by

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

1.

select first,
age
from empinfo;
2. select first,
last,
city
from empinfo
where city <>
'Payson';
3. select * from empinfo
where age > 40;
4. select first, last from empinfo
where last LIKE '%ay';
5. select * from empinfo
where first = 'Mary';
6. select * from empinfo
where first LIKE '%Mary%';
7. create table
myemployees
(firstname varchar(30),
lastname varchar(30),
title varchar(30),
age number(2),
salary number(8,2));
8. select * from
myemployees;
9. select * from
myemployees
where salary > 30000;
10. select firstname, lastname
from myemployees
where age < 30;
11. select firstname, lastname, salary
from myemployees
where title LIKE '%Programmer%';
12. select * from
myemployees
where lastname LIKE '%ebe%';
13. select firstname from
myemployees
where firstname = 'Potsy';
14. select * from
myemployees
where age > 80;
15. select * from
myemployees
where lastname LIKE '%ith';
16. update myemployees
set lastname = 'Weber-Williams'
where firstname = 'Jonie' and lastname = 'Weber';
select * from myemployees;
17. update myemployees
set age = age+1
where firstname = 'Dirk' and lastname='Smith';
select * from myemployees;
18. update myemployees
set title = 'Administrative Assistant'
where title = 'Secretary';
select * from myemployees;
19. update myemployees
set salary = salary + 3500
where salary < 30000;
select * from myemployees;
20. update myemployees
set salary = salary + 4500
where salary > 33500;
select * from myemployees;
21. update myemployees
set title = 'Programmer III'
where title = 'Programmer II';
select * from myemployees;
22. update myemployees
set title = 'Programmer II'
where title = 'Programmer';
select * from myemployees;
23. delete
from myemployees
where lastname =
'Weber-Williams';
select * from myemployees;
24. delete
from myemployees
where salary >
70000;
select * from myemployees;
25. drop table myemployees;

You might also like