1

I want the default value with group by clause.

I tried with below query but not get success

SELECT ISNULL(MAX(Sum(points)),0)  
   FROM Table1 
   group by PanelistID having PanelistID = 4310497

please do need full

4

1 回答 1

1
SELECT 4310497 AS some, ISNULL(MAX(Sum(points)),0)  
   FROM Table1 
WHERE PanelistID = 4310497
   GROUP BY  PanelistID

您可以在 SELECT CLAUSE 中插入常量值,它不会影响 GROUP CLAUSE

于 2013-10-30T05:55:29.313 回答