11 lines
275 B
MySQL
11 lines
275 B
MySQL
|
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;
|