How do I perform a MOD calculation in SQL when the MOD operator is not available?
Scott
Example: 12 MOD 10 = 8
Printable View
How do I perform a MOD calculation in SQL when the MOD operator is not available?
Scott
Example: 12 MOD 10 = 8
Use % called as Modulo in SQL Server to perform a MOD calculation.
ex:DECLARE @A INT
DECLARE @B INT
SET @A=12
SET @B=10
SELECT @A%@B
Result is
2
Madhu.
"Scott" <sremiger@pnms.com> wrote:
>
>How do I perform a MOD calculation in SQL when the MOD operator is not available?
>
>Scott
>Example: 12 MOD 10 = 8