Answers for "foreign key with multiple columns"

SQL
0

select columns from 2 tables with foreign key

SELECT user.name, movie.name
FROM user, movie, list
WHERE list.user_id  = user.id
  AND list.movie_id = movie.id
ORDER BY 1,2;
Posted by: Guest on June-22-2020
0

select columns from 2 tables with foreign key

SELECT user.name, movie.name
FROM user
JOIN list  ON list.user_id  = user.id
JOIN movie ON list.movie_id = movie.id
ORDER BY 1,2;
Posted by: Guest on June-22-2020
0

foreign key multiple columns

CREATE TABLE Employee(
    EmployeeID int NOT NULL PRIMARY KEY,
    LastName varchar(50) NOT NULL,
    FirstName varchar(20) NOT NULL,
    Age int,
    DeptNo int,
    PRIMARY KEY (EmployeeID),
    CONSTRAINT FK_PersonOrder FOREIGN KEY (DeptNo)
    REFERENCES Department(DeptNo)
);
Posted by: Guest on July-06-2021

Code answers related to "foreign key with multiple columns"

Code answers related to "SQL"

Browse Popular Code Answers by Language