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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!