Tuesday, November 22, 2011

Mysql if null Example

SELECT IFNULL(parent_id, 0) AS pid, COUN T(IFNULL(parent_id, 0)) AS ans_count FROM qa GROUP BY IFNULL(parent_id, 0)

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home