Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

-- Create the HRIS database

CREATE DATABASE IF NOT EXISTS HRIS;


USE HRIS;

-- Drop the Employee table if it exists


DROP TABLE IF EXISTS Employee;

-- Create the Employee table


CREATE TABLE Employee (
EmployeeID INT AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Email VARCHAR(100),
Phone VARCHAR(20),
Department VARCHAR(50),
Position VARCHAR(50),
Salary DECIMAL(10,2),
HireDate DATE
);

-- Insert sample data into the Employee table


INSERT INTO Employee (FirstName, LastName, Email, Phone, Department, Position,
Salary, HireDate) VALUES
('John', 'Doe', 'john.doe@example.com', '123-456-7890', 'HR', 'Manager', 60000.00,
'2023-01-15'),
('Jane', 'Smith', 'jane.smith@example.com', '987-654-3210', 'IT', 'Developer',
55000.00, '2023-02-20'),
('Alice', 'Johnson', 'alice.johnson@example.com', '456-789-0123', 'Marketing',
'Marketing Specialist', 50000.00, '2023-03-25'),
('Bob', 'Williams', 'bob.williams@example.com', '789-012-3456', 'Finance',
'Accountant', 52000.00, '2023-04-30'),
('Emily', 'Brown', 'emily.brown@example.com', '321-654-9870', 'Operations',
'Operations Manager', 65000.00, '2023-05-05'),
('Michael', 'Jones', 'michael.jones@example.com', '555-555-5555', 'Sales', 'Sales
Representative', 48000.00, '2023-06-10'),
('Sarah', 'Garcia', 'sarah.garcia@example.com', '111-222-3333', 'Customer Service',
'Customer Service Specialist', 47000.00, '2023-07-15'),
('David', 'Martinez', 'david.martinez@example.com', '444-444-4444', 'HR', 'HR
Assistant', 42000.00, '2023-08-20');

-- Display the contents of the Employee table


SELECT * FROM Employee;

You might also like