Divides one number by another.
The numeric expression to divide. The
dividendcan be any valid expression in Microsoft SQL Server Compact of any of the data types of the numeric data type category, except the data type. datetime divisor
The numeric expression by which to divide the dividend. The
divisorcan be any valid SQL Server expression of any of the data types of the numeric data type category, except the data type. datetime
Returns the data type of the argument with the higher precedence.
The following example uses the divide arithmetic operator to determine the average total cost for each order of a specific product (with a Product ID of 51) in the Order Details table. Product 51 has 39 orders.
SELECT (SUM(UnitPrice * Quantity))/39 AS "Avg. Cost per Order" FROM "Order Details" WHERE ProductID = '51'
This is the result set:
Avg. Cost per Order
( 1500 characters remaining)
Thank you for your feedback