SQL additions, deletions, and changes to check StudentDB-change

-1. Increase the scores of students who failed the elective course "0101005" by 5 points.

UPDATE Result
SET Result=Result+5
WHERE cno ='0101005'

-2. Modify the address of the student whose student ID is "1101011101" to "No. 21 Xingfu Road, Hangzhou City, Zhejiang Province".

SELECT *
FROM Result


UPDATE Student
SET Address='浙江省杭州市幸福路21号'
WHERE Sno='1101011101'

–3. Modify the class number of students whose class number is "11010111" to "11010119".

UPDATE Student
SET Classno='11010119'
WHERE Classno='11010111'

-4. Revise the credits of the "graphic design" course to 6.

UPDATE Course
SET Credits=6
WHERE Cname='平面设计'

-5. Modify the emails of students whose emails are empty to "Unknown email".

UPDATE Student
SET Email='邮件不详'
WHERE Email IS NULL

Guess you like

Origin blog.csdn.net/csdcainiao/article/details/106652829