(Modulo) (Entity SQL)
Returns the remainder of one expression divided by another.
Syntax
dividend % divisor
Arguments
dividend
The numeric expression to divide. dividend
is any valid expression of any one of the numeric data types.
divisor
The numeric expression to divide the dividend by. divisor
is any valid expression of any one of the numeric data types.
Result Types
Edm.Int32
Example
The following Entity SQL query uses the % arithmetic operator to return the remainder of one expression divided by another. The query is based on the AdventureWorks Sales Model. To compile and run this query, follow these steps:
Follow the procedure in How to: Execute a Query that Returns StructuralType Results.
Pass the following query as an argument to the
ExecuteStructuralTypeQuery
method:
SELECT VALUE product FROM AdventureWorksEntities.Products
AS product WHERE product.ListPrice = @price1 % @price2