Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I query a table

SELECT COUNT(*) FROM sf_guard_user_group

return count 1 but table has total 28 records. But if I test it via putty from another machine, it shows count 28. Help to sort out.

enter image description here

share|improve this question
You missed the FROM :) – ypercubeᵀᴹ Oct 16 '13 at 11:50
true, it might alias the count(*) and return 1. Thanks – JP Chauhan Oct 16 '13 at 11:59

I query a table "Select count(*) from sf_guard_user_group"

That's not true, according to the screenshot. I don't see the FROM clause there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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