I was looking at script in Sybase when I read something like

    select count() from table;

the result it's exactly the same to

    select count(*) from table;

I'm curious, and I was looking out for more info in google but I didn't found anything. I suppose that select count(*) from table it is ANSI and select count() from table not, and its just another way that sybase allow to do do it.

but anyway I would like to know if there is any difference or why are two different ways to do the same.

  • The first one is invalid SQL.
    – user1822
    Commented Mar 20, 2017 at 10:15
  • @a_horse_with_no_name what do you men with "invalid SQL" it works exactly the same as the second one. Commented Mar 20, 2017 at 10:31
  • Then it's some speciality in Sybase - but it's incorrect syntax in standard SQL.
    – user1822
    Commented Mar 20, 2017 at 10:34

1 Answer 1


According to Sybase documentation:

COUNT(*) and COUNT() are semantically equivalent. 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.