SELECT 10000/(17/17/17) AS Result2;
When we execute above query it gives following error:
Code
Msg 8134, Level 16, State 1, Line 1 Divide by zero error encountered.SELECT 10000/(17/17/17) AS Result2;
When we execute above query it gives following error:
Msg 8134, Level 16, State 1, Line 1 Divide by zero error encountered.Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 29, 2014, 2:39 AM EST
Hi Namit Kumar,
Actually 17/17/17 return Zero so it is returning error.
17/17=1
1/17=0 (when 1/17 it gives reminder 1 and result 0)
1%17=1 (reminder 1)
this is the reasion it is returing 0
Actually 17/17/17 return Zero so it is returning error.
17/17=1
1/17=0
1%17=1
because actuality SELECT 10000/(0) AS Result2; so this error is coming