April 22, 2008 at 6:10 pm
hai everybody,
here is a statement
if(0='')
print('yes')
else
print('no')
now if u execute this above statement the result will be yes
and if u give not equal to in if statement it says no
can u explain why is this happenening
thanx to everybody in advance
April 22, 2008 at 10:01 pm
SQL does a lot of implicit data type conversions when it is processing queries. This occurs whenever the data types are not exactly the same (e.g. assigning an INT to a BIGINT).
When the conversion is between a character datatype and and int data type, and the char column or variable is either space or empty string, it is converted to 0.
April 23, 2008 at 9:40 am
thank u very much
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply