• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1204
  • Last Modified:

Mathematical functions in T-SQL

How do I find a list of mathematical functions in SQL?

I would like to find the equivalent of the modulo function (Mod) in VB.

E.g. to look for houses with an even number, the following SQL statement works fine with Access databases:

SELECT * FROM Place WHERE (((Place.house_no) Mod 2)=0);

How do I do this in SQL Server?
1 Solution
did you try

SELECT * FROM Place WHERE Place.house_no % 2=0;

I think sql server uses modulo operator that looks like a percent sign

To find complete list of mathematical functions and operators try look up On-Line documentation under
"Transact-SQL Reference->Operators"
"Transact-SQL Reference->Functions"

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now