Detta kommer att fungera bättre: SELECT COUNT(*) OVER (), c.* FROM CUSTOMER c WHERE c.Name like 'foo%';