We can get square root of any number by using sqrt function, here are some examples.
select sqrt(16); // output is 4
select sqrt(20); // output is 4.47213595499958
For negative number we will get NULL output
select sqrt(-25); // output is NULL
Be the first to post comment on this article :
|More on Math functions in SQL|