CS1103/Labs/Lab6/2.sql

11 lines
275 B
MySQL
Raw Permalink Normal View History

2022-10-07 00:48:09 -03:00
CREATE TABLE Students
(
studentID INT AUTO_INCREMENT,
studentName VARCHAR(30) NOT NULL,
email VARCHAR(40),
gpa FLOAT DEFAULT 0.0,
PRIMARY KEY (studentID),
CONSTRAINT CHECK_GPA
CHECK (gpa BETWEEN 0 and 4.3)
);
ALTER TABLE Students ADD dateOfBirth DATETIME;