DBMS agnostic - What to name the COUNT column from a SQL Query

Posted by cyberkiwi on Programmers See other posts from Programmers or by cyberkiwi
Published on 2011-01-31T21:36:47Z Indexed on 2011/02/01 7:32 UTC
Read the original article Hit count: 342

Filed under:
|
|
|
|

I have trouble naming the COUNT() column from SQL queries and will swap between various variants

  • _Count
  • [Count] (sql, or "count" or backticks for MySQL etc)
  • C
  • Cnt
  • CountSomething (where "something" is the field being counted, or "CountAll")
  • NoOfRows
  • RowCount
  • etc

Has anyone come up with any name that you are happy with and always use without hesitation?
This is bothering me because after joining SO just recently, my answers have shown this tendency of flip-flopping with no consistency.
I need to get this sorted.

Please help.

(While we're at it, what do you use for SUM etc?)

Note: Before you close this question, consider that this one was not:

What's the best name for a non-mutating “add” method on an immutable collection?

© Programmers or respective owner

Related posts about sql

Related posts about database