--USE OnlineAssessment USE odiproj1_oa GO --INSERT INTO Institutes (name, state_id, created_by, updated_on, updated_by, domain) VALUES ('OTPL',7,1,'2020-11-27T18:22:38.623',1, 'otpl'); DROP TABLE IF EXISTS dbo.ExamAttempts CREATE TABLE dbo.ExamAttempts ( [id] INT PRIMARY KEY IDENTITY (1, 1), [exam_id] INT NOT NULL, [remaining_time_seconds] INT NOT NULL, [score] INT, [average_time_seconds] INT, [status] VARCHAR(20) NOT NULL, [created_on] DATETIME DEFAULT GETDATE(), [created_by] INT NOT NULL, [updated_on] DATETIME NOT NULL, [updated_by] INT NOT NULL, [is_active] BIT DEFAULT (1), CONSTRAINT FK_ExamAttempts_Exam FOREIGN KEY (exam_id) REFERENCES Exams (id) ); GO