Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE [Students](
- [StudentID] INT IDENTITY PRIMARY KEY,
- [Name] NVARCHAR(20)
- )
- CREATE TABLE [Exams](
- [ExamID] INT IDENTITY(101,1) PRIMARY KEY,
- [Name] NVARCHAR(50)
- )
- CREATE TABLE [StudentsExams](
- [StudentID] INT REFERENCES [Students]([StudentID]),
- [ExamID] INT REFERENCES [Exams]([ExamID]),
- PRIMARY KEY([StudentID], [ExamID])
- )
- INSERT INTO [Students]
- VALUES
- ('Mila'),
- ('Toni'),
- ('Ron')
- INSERT INTO [Exams]
- VALUES
- ('SpringMVC'),
- ('Neo4j'),
- ('Oracle 11g')
- INSERT INTO [StudentsExams]
- VALUES
- (1, 101),
- (1, 102),
- (2, 101),
- (3, 103),
- (2, 102),
- (2, 103)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement