Divides one number by another (an arithmetic division operator).
dividend / divisor
Returns the data type of the argument with the higher precedence. For more information about data type precedence, see Data Type Precedence.
If an integer dividend is divided by an integer divisor, the result is an integer that has any fractional part of the result truncated.
The actual value returned by the / operator is the quotient of the first expression divided by the second expression.
This example uses the division arithmetic operator to calculate the royalty amounts due for authors who have written business books.
USE pubs
GO
SELECT ((ytd_sales * price) * royalty)/100 AS 'Royalty Amount'
FROM titles
WHERE type = 'business'
ORDER BY title_id
Data Types | SELECT |
Expressions | WHERE |
Functions | Operators |