When you want to determine if a database column is empty (i.e not null but there is not any value in it) what are the differences between the below options:
customerRegion varchar(10) NULL
is retrieved from the SQL database:
If customerRegion = "" Then
If customerRegion = Nothing Then
If String.IsNullOrEmpty(customerRegion) Then
If customerRegion Is Nothing Then
1,2,3 returns True 4 returns False when the column is empty.
Is 1 and 2 technically the same thing? and Why is 4 returning False?
Out of 1,2 and 3 which one should be used to determine if the column is empty (or is there any other way of doing it)?
Thanks