UPDATE userinfo SET salary=1700 WHERE UserID=142
SELECT dept,count(*) as count FROM userinfo GROUP BY dept HAVING count(dept) >1
ORDER BY count DESC