+ (Add) (SQL Server Compact)

Adds two numbers. This addition arithmetic operator also can add a number, in days, to a date.

expression + expression


Any valid expression in Microsoft SQL Server Compact of any of the data types in the numeric category, except the bit data type.

Returns the data type of the argument with the higher precedence.

In the following example, you want to create a target total, which is the current number of customers plus 50. The following example adds 50 to the total number of current customers. This result of the query in this example assumes that there are 90 current customers listed in the Customers table.

SELECT COUNT(CustomerID) + 50 AS "Target Total" FROM Customers

This is the result set:

Target Total