Mysql
 sql >> Database >  >> RDS >> Mysql

php:come modificare i dati delle stringhe diventano dati numerici

SELECT `Model`,
IF(`Class`='S', 1, 0) AS `S`,
IF(`Class`='A', 1, 0) AS `A`,
IF(`Class`='B', 1, 0) AS `B`,
IF(`Class`='C', 1, 0) AS `C`
FROM `inspection_report`