Saturday, 25 October 2014

Something about Empty String

In this article, i am going to explain meaning of an Empty String in int type column.
create table tblEmptyString (SrNo int null)
insert into tblEmptyString (SrNo) values (1)
insert into tblEmptyString (SrNo) values (2)
insert into tblEmptyString (SrNo) values ('')
insert into tblEmptyString (SrNo) values (null)

select * from tblEmptyString

Output

As we can see, implicit conversion of the empty string to a value of 0 happened here. These Issues sometimes can create problems for us. So from now, we have to care about Empty String more.

That’s it!!…..Happy Programming...

2 comments:

  1. http://www.codeproject.com/Tips/83354/Improve-in-AJAX-response

    ReplyDelete