Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

Dividing in SQL

Asked by Diane Carr Apr 24, 2021 768 views 1 answer
Share

About this question

can anyone explain to me why this query returns 0.000?

SELECT CAST(20/1024 AS NUMERIC(10,3))

I am just trying to do a simple conversion of MB to GB. How does SQL server division work?

 Thanks

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.