Create The SQL Commands For Creating The Employer

Submitted By JoshLuster1
Words: 847
Pages: 4

POS410 - WEEK 2 INDIVIDUAL ASSIGNMENT
STUDENT NAME Josh Luster
Folks, you need to show at least two portions for each requirement: 1) the SQL code used to satisfy the requirement and 2) a screenshot showing that the SQL Code executed properly in SQL Server. See the bottom of this document for an example of a SQL code followed by the screenshot.
ASSIGNMENT REQUIREMENTS
After each of the following requirements, please paste the appropriate material: 1) Show the SQL Commands for creating the EMPLOYEE table (1.5 points)

-- Create the Employee using CREATE TABLE
CREATE TABLE Employee
(Emp_id int NOT NULL IDENTITY(1,1) PRIMARY KEY,

Last_name varchar(25) NOT NULL,

First_name varchar(25) NOT NULL,

Address varchar(40) NOT NULL,

City varchar(15) NOT NULL,

State char(2) NOT NULL,

Telephone_area_code varchar(3) NOT NULL,

Telephone_number varchar(8) NOT NULL,

Job_title varchar(50) NOT NULL

FOREIGN KEY REFERENCES Job_title(Job_title),

Hire_date smalldatetime NOT NULL,

Wage money NOT NULL,

Gender char(1) NOT NULL,

Race varchar(25) NOT NULL,

Age int NOT NULL

);

GO a. Show a screen shot showing the proper execution of the table (1 point)

Attached PNG

2) Show the SQL Commands for creating the JOBTITLE table(1.5 points)

CREATE TABLE Job_title

(

Job_title varchar(50) NOT NULL PRIMARY KEY,

EEO_1_Classification varchar(30) NOT NULL,

Job_description varchar(250) NOT NULL,

Exempt_Non_Exempt_Status bit NOT NULL

);

GO b. Show a screen shot showing the proper execution of the table (1 point)

Attached PNG

3) Show all the SQL INSERT statements for the EMPLOYEE table(1.5 points)

INSERT INTO Employee VALUES

('Edelman', 'Glenn', '175 Bishops Lane', 'La Jolla', 'CA', '619', '555-0199',

'Cashier', '07-OCT-2003', 21500.00, 'M', 'Caucasian', 64);

INSERT INTO Employee VALUES

('McMullen', 'Eric', '763 Church St', 'Lemon Grove', 'CA', '619', '555-0133',

'Bagger', '1-NOV-2002', 13500.00, 'M', 'Caucasian', 20);

INSERT INTO Employee VALUES

('Slentz', 'Raj', '123 Torrey Dr.', 'North Clairmont', 'CA', '619', '555-0123',

'Assistant Manager', '1-JUN-2000', 48000.00, 'M', 'Asian', 34);

INSERT INTO Employee VALUES

('Broun', 'Erin', '2045 Parkway Apt.2B', 'Encinitas', 'CA', '760', '555-0100',

'Bagger', '12-MAR-2003', 10530.00, 'F', 'Caucasian', 24);

INSERT INTO Employee VALUES

('Carpenter', 'Donald', '927 Second ST.', 'Encinitas', 'CA', '619', '555-0154',

'Stocker', '1-NOV-2003', 15000.00, 'M', 'African American', 18);

INSERT INTO Employee VALUES

('Esquivez', 'David', '10983 N. Coast Hwy Apt 902', 'Encinitas', 'CA', '760', '555-0108',

'Retail Asst. Butchers & Seafood Specialists', '25-JUL-2003', 18500.00, 'M', 'Hispanic', 25);

INSERT INTO Employee VALUES

('Sharp', 'Nancy', '10793 Monteciono Rd', 'Ramona', 'CA', '858', '555-0135',

'Cashier', '12-JUL-2003', 21000.00, 'F', 'Caucasian', 24); c. Show a screen shot showing the proper execution of the INSERT (1 point)

Attached PNG

4) Show all the SQL INSERT statements for the JOBTITLE table(1.5 points)

-- Insert the Job_title records

INSERT INTO Job_title VALUES

('Accounting Clerk', 'Office/Clerical', 'Computes, classifies, records,

and verifies numerical data for use in maintaining accounting records.', 0);

INSERT INTO Job_title VALUES

('Assistant Manager', 'Officials & Managers', 'Supervises and coordinates activities

of workers in department of food store. Assists store manager in daily operations of store.', 1);

INSERT INTO Job_title VALUES