Question
Add more 10 examples for this query result -- Create a table named Employee_Qualifications to associate employees with qualifications CREATE TABLE Employee_Qualifications ( -- Foreign
Add more 10 examples for this query result
-- Create a table named "Employee_Qualifications" to associate employees with qualifications
CREATE TABLE Employee_Qualifications (
-- Foreign key referencing EmployeeID in the Employees table
EmployeeID INT,
-- Foreign key referencing QualificationID in the Qualifications table
QualificationID INT,
-- Primary key composed of both EmployeeID and QualificationID
PRIMARY KEY (EmployeeID, QualificationID),
-- Establishing a foreign key relationship with the Employees table
FOREIGN KEY (EmployeeID) REFERENCES Employees(EmployeeID),
-- Establishing a foreign key relationship with the Qualifications table
FOREIGN KEY (QualificationID) REFERENCES Qualifications(QualificationID)
);
-- Inserting records into the "Employees" table
INSERT INTO Employees VALUES
-- Record for Employee 1 (John Doe)
(1, 'John', 'Doe', '1980-01-01', 1, 80000.00, 1, 1, 'john.doe@email.com', '123-456-7890'),
-- Record for Employee 2 (Jane Doe)
(2, 'Jane', 'Doe', '1975-01-01', 2, 70000.00, 2, 2, 'jane.doe@email.com', '987-654-3210'),
-- Record for Employee 3 (Alice Smith)
(3, 'Alice', 'Smith', '1985-01-01', 3, 90000.00, 3, 3, 'alice.smith@email.com', '098-765-4321');
-- Create a table named "Employee_Qualifications" to associate employees with qualifications
CREATE TABLE Employee_Qualifications (
-- Foreign key referencing EmployeeID in the Employees table
EmployeeID INT,
-- Foreign key referencing QualificationID in the Qualifications table
QualificationID INT,
-- Primary key composed of both EmployeeID and QualificationID
PRIMARY KEY (EmployeeID, QualificationID),
-- Establishing a foreign key relationship with the Employees table
FOREIGN KEY (EmployeeID) REFERENCES Employees(EmployeeID),
-- Establishing a foreign key relationship with the Qualifications table
FOREIGN KEY (QualificationID) REFERENCES Qualifications(QualificationID)
);
-- Inserting records into the "Employee_Qualifications" table
INSERT INTO Employee_Qualifications VALUES
-- Assigning Qualification 1 to Employee 1
(1, 1),
-- Assigning Qualification 2 to Employee 2
(2, 2),
-- Assigning Qualification 2 to Employee 3
(3, 2);
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started