Add Two Numbers Examples On Mysql

If we want to sum same column’s value, we must use sum() aggregate function.

Example: Find the total page count of all books.

Answer:

If we want to sum different columns value then we must use + (plus) operator on the query.

Example: List pagecount, point and sum of pagecount and point columns values.

If we want to find sum of two variables value then the example below.

Example

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: