Home > database >  Mysql
Mysql

Time:09-19

Bother god write SQL statement these days

CodePudding user response:

Your replacement field

SELECT is a number FROM the table name WHERE gender='male' GROUP BY system, HAVING the COUNT (0) & gt;=200;

SELECT the student table. *, course selection table. * FROM students table LEFT JOIN course selection table ON course selection table. Student id=the student table. The student number;

UPDATE course selection table SET grades=0 WHERE course selection table. Student id IN number (student table.='computer department);

CodePudding user response:

Why in the Count () is zero, thank you

CodePudding user response:

reference 1st floor AHUA1001 response:
replace field yourself

SELECT is a number FROM the table name WHERE gender='male' GROUP BY system, HAVING the COUNT (0) & gt;=200;

SELECT the student table. *, course selection table. * FROM students table LEFT JOIN course selection table ON course selection table. Student id=the student table. The student number;

UPDATE course selection table SET grades=0 WHERE course selection table. Student id IN number (student table.='computer department);
Count in parentheses () why is zero