practicekea_backend/database/insert_record_scripts/dropandcreate.sql

28 lines
721 B
MySQL
Raw Permalink Normal View History

2024-12-02 13:24:34 +00:00
--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