Last active
July 29, 2024 20:51
-
-
Save jeffersonchaves/2342cea9050e85a1197ed2ad1661c0c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE department ( | |
Id int(11) NOT NULL AUTO_INCREMENT, | |
Name varchar(60) DEFAULT NULL, | |
PRIMARY KEY (Id) | |
); | |
CREATE TABLE seller ( | |
Id int(11) NOT NULL AUTO_INCREMENT, | |
Name varchar(60) NOT NULL, | |
Email varchar(100) NOT NULL, | |
BirthDate datetime NOT NULL, | |
BaseSalary double NOT NULL, | |
DepartmentId int(11) NOT NULL, | |
PRIMARY KEY (Id), | |
FOREIGN KEY (DepartmentId) REFERENCES department (id) | |
); | |
INSERT INTO department (Name) VALUES | |
('Computers'), | |
('Electronics'), | |
('Fashion'), | |
('Books'); | |
INSERT INTO seller (Name, Email, BirthDate, BaseSalary, DepartmentId) VALUES | |
('Dustin Henderson','[email protected]','1998-04-21 00:00:00',1000,1), | |
('Mike Wheeler','[email protected]','1979-12-31 00:00:00',3500,2), | |
('Will Byers','[email protected]','1988-01-15 00:00:00',2200,1), | |
('Lucas Sinclair','[email protected]','1993-11-30 00:00:00',3000,4), | |
('Eleven Ives','[email protected]','2000-01-09 00:00:00',4000,3), | |
('Jim Hopper','[email protected]','1997-03-04 00:00:00',3000,2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment