Tuesday, November 28, 2017

Using Pi in T-SQL!

Yes this is a thing. If you have diameter and you need a translation of it to a circumference, well there you go. I never thought I'd use it, but today I have.

SELECT Size * Pi() as 'Foo' FROM Bar

 
 

decimal(22,7) is the type for this, Pi and things multiplied against it.

No comments:

Post a Comment