company

an anonymous user · September 15, 2021 · SQL
CREATE TABLE user(
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(100),
    last_name VARCHAR(100),
    home_address VARCHAR(100),
    phone VARCHAR(100)
    );
    
CREATE TABLE work (
    id INT AUTO_INCREMENT PRIMARY KEY,
    work_id INT,
    department VARCHAR(100),
    salary DECIMAL(8,4),
    FOREiGN KEY (work_id) REFERENCES user(id)
    );

Comments

Please sign up or log in to contribute to the discussion.