Create Function Finding the Number Remaining From The Division of Two Numbers In Sql Not Using Mod – Query Examples

Create Function Finding the Number Remaining From The Division of Two Numbers In Sql Not Using Mod

In this example we will create a funciton that finds the number remaining  from the division of two numbers. In sql normally used % operator for finding remaining value. We will not use % operator in the function. We will do our own function.

When we run the code above we will get succesfull message. Then we can calculate different number’s remaining values.

Example

Result : 1

Example

Result : 0

Example

Result : 8

Example

Result : 3

Example in a Query

Result :

CLICK HERE TO SEE MORE EXAMPLE ABOUT SCALAR VALUED FUNCTIONS

YOU MAY WANT TO SEE OUR ALL EXAMPLES PAGE, THEN CLICK HERE

About the author

admin

Leave a Comment

%d bloggers like this: