SQL LEFT JOIN return 0 rather than NULL
You can use "CASE"
SELECT T1.NAME, CASE WHEN T2.DATA IS NULL THEN 0 ELSE T2.DATA END
FROM T1 LEFT JOIN T2 ON T1.ID = T2.ID
Use:
ISNULL(count(*), 0)
You can use "CASE"
SELECT T1.NAME, CASE WHEN T2.DATA IS NULL THEN 0 ELSE T2.DATA END
FROM T1 LEFT JOIN T2 ON T1.ID = T2.ID
Use:
ISNULL(count(*), 0)