Петър Толумов 12г клас Н16

an anonymous user · December 06, 2021 · SQL
CREATE TABLE courses(
id_courses INT NOT NULL PRIMARY KEY,
name_courses VARCHAR(50)
);
CREATE TABLE students(
id_students INT NOT NULL PRIMARY KEY,
name_students VARCHAR(80),
id_courses INT,
CREATE TABLE courses_students(
id_courses INT,
id_students INT,
PRIMARY KEY (id_courses,id_students),
FOREIGN KEY(id_students) REFERENCES students(id_students),
          	FOREIGN KEY(id_courses) REFERENCES       courses(id_courses)
 );

Comments

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