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.
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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manish Kumar ChoudharyPosted Dec 29, 2014, 7:39 AM
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