我很抱歉大家,它不允许我发表评论。你说的对。这是我遇到问题的 ALTER。如何将累积 GPA 列添加到 gpa 显示在 0.00 和 4.00 之间的表中(使用 alter 语句)
CREATE database "IS4440_DuBoseJasmine"
CREATE TABLE StudentInformation (
StudentID CHAR(7) not null,
StudentSSN CHAR(9) null,
StudentFirstName VARCHAR(50) null,
StudentLastName VARCHAR(50) null,
StudentMiddleName VARCHAR(50) null,
StudentHomeCountry CHAR(2) not null
)
/*2*/
ALTER TABLE StudentInformation ADD Cumulative GPA ;
/*3*/
INSERT INTO StudentInformation (StudentID, StudentLastName, StudentFirstName, StudentMiddleName, StudentHomeCountry)
VALUES ('1352154', 'DuBose', 'Jasmine', 'Leigh', 'US')
INSERT INTO StudentInformation (StudentID, StudentLastName, StudentFirstName, StudentMiddleName, StudentHomeCountry)
VALUES ('1234565', 'Smith', 'Johnny', 'Apple', 'GB');
/*4*/
UPDATE StudentInformation SET StudentSSN = 123456789
WHERE StudentID = 1352154;