sql练习记录

三表关联如果字段为0则表示是散客卡

select a.shop_id as id,b.shop_name,a.balance,a.point,
(IF(a.card_type_id<>0,concat(c.card_type,"(测试环境测试11)"),'散客卡(测试环境测试11)')) as card from members a INNER JOIN
shops b on a.shop_id=b.id LEFT JOIN card_types c on a.card_type_id=c.id where a.mobile_phone=11111111111;

上一篇:第23章 java线程通信——生产者/消费者模型案例


下一篇:利用Android手机里的摄像头进行拍照