Re: [SQL ] NVL 相關疑難一問

看板Database作者 (ken)時間12年前 (2012/03/03 20:12), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/2 (看更多)
SELECT if(car is null ,0,count(*)) as item_count ,carname as car from tb left outer join ta on tb.carname = ta.car group by carname; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.87.129.115

03/03 20:18, , 1F
改成SELECT count(car) as item_count 這樣好了
03/03 20:18, 1F

03/16 10:13, , 2F
感謝感謝 學到了一課
03/16 10:13, 2F
文章代碼(AID): #1FKWgic7 (Database)
文章代碼(AID): #1FKWgic7 (Database)