B
B
BonBon Slick2017-07-07 19:59:49
SQL
BonBon Slick, 2017-07-07 19:59:49

Is it possible to somehow count the data of a column in a table?

I want to calculate on the fly, data in a table column. Basic example:
there is a user id, it is not generated by auto-increment, that is, the second record may have id = 5691234, instead of 2.
How to calculate the total value of all user ids, on the fly using only SQL?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Wolf, 2017-07-07
@BonBonSlick

How to calculate the total value of all user ids on the fly using only SQL?
SELECT SUM(id) FROM table1;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question