2017-04-08 51 views
0
Select distinct a.*, 
    b.scannerid, 
    date(b.datetime) as datetime, 
    b.status from studentdetails a 
LEFT OUTER JOIN discovereddevices b 
    ON a.bluetoothid = b.blueid and date (b.datetime) = CURRENT_DATE 

回答

1

使用COALESCE

COALESCE(yourcolumnname,'Absent') as yourcolumnname 

如果該值爲NULL該列那麼這個詞缺席將出現在它的地方。請注意,您必須爲每個需要它完成的列執行此操作。

相關問題