Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have just started a new company. It is time to hire some employees. You will need to create a new table table (newEmployees) that

You have just started a new company. It is time to hire some employees. You will need to create a new table table (newEmployees) that will contain the following information about your new employees: firstname, lastname, title, age, and salary. After you create the table, you should receive a small form on the screen with the appropriate column names. If you are missing any columns, you need to double check your SQL statement and recreate the table.

1. It is time to insert data into your new employee table : Your first three employees are the following:

Jonie Weber, Secretary, 28, 19500.00 Potsy Weber, Programmer, 32, 45300.00 Dirk Smith, Programmer II, 45, 75020.00

Enter these employees into your table first, and then insert at least 5 more of your own list of employees in the table.

2. After they're inserted into the table, enter select statements to:

Select all columns for everyone in your employee table.

Select all columns for everyone with a salary over 30000.

Select first and last names for everyone that's under 30 years old.

Select first name, last name, and salary for anyone with "Programmer" in their title.

Select all columns for everyone whose last name contains "ebe".

Select the first name for everyone whose first name equals "Potsy".

Select all columns for everyone over 80 years old.

Select all columns for everyone whose last name ends in "ith".

3. Now do the following UPDATES

Jonie Weber just got married to Bob Williams. She has requested that her last name be updated to Weber-Williams.

Dirk Smith's birthday is today, add 1 to his age.

All secretaries are now called "Administrative Assistant". Update all titles accordingly.

Everyone that's making under 30000 are to receive a 3500 a year raise.

Everyone that's making over 33500 are to receive a 4500 a year raise.

All "Programmer II" titles are now promoted to "Programmer III".

All "Programmer" titles are now promoted to "Programmer II".

4. Now delete some records:

An example for delete command :

delete from employee where lastname = 'May';

Jonie Weber-Williams just quit, remove her record from the table.

It's time for budget cuts. Remove all employees who are making over 70000 dollars.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions