关键词:IF
--if 判断,如果 device_num 的值为1,则赋值为100,反之为200 SELECT district, shop_name, IF ( device_num = 1, 100, 200 ) AS device_num FROM `t_life_shop`
关键词:IF
--if 判断,如果 device_num 的值为1,则赋值为100,反之为200 SELECT district, shop_name, IF ( device_num = 1, 100, 200 ) AS device_num FROM `t_life_shop`