SELECT * gives error when executed alone but SELECT COUNT(*) does not.