Skip to content

Instantly share code, notes, and snippets.

@machinelearningplus
Last active September 16, 2023 11:48
Show Gist options
  • Save machinelearningplus/070906ba0d4dd28eb4ca9d507b3afbc2 to your computer and use it in GitHub Desktop.
Save machinelearningplus/070906ba0d4dd28eb4ca9d507b3afbc2 to your computer and use it in GitHub Desktop.
CREATE TABLE employees (
employee_id INT PRIMARY KEY,
employee_name VARCHAR(50),
department_id INT
);
CREATE TABLE departments (
department_id INT PRIMARY KEY,
department_name VARCHAR(50)
);
INSERT INTO employees (employee_id, employee_name, department_id)
VALUES
(1, 'John', 1),
(2, 'Jane', 2),
(3, 'Bob', NULL),
(4, 'Alice', 4);
INSERT INTO departments (department_id, department_name)
VALUES
(1, 'HR'),
(2, 'Finance'),
(3, 'Marketing');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment