sql - Null or empty check for a string variable -


if((isnull(@value,''))='') 

i want know whether above piece of code works in checking if variable null or empty.

yes, code that.

you can use:

if (@value null or @value = '') 

edit:

with added information @value int value, need instead:

if (@value null) 

an int value can never contain value ''.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -