How to check whether a string is null or not?
Could any one give me an idea to check whether a string is null or not without making use of followin:
1. length(string)
2. Comparing string with ""
3开发者_Python百科. string ! = NULL
use IS NOT NULL on String
Like
SELECT * FROM table WHERE someString IS NOT NULL
Use string IS NOT NULL. Using string != NULL is not valid SQL...
I'm not sure exactly what your asking, but you can check for null using IS NULL;
SELECT 1 WHERE '' IS NULL
or
SELECT 1 WHERE NULL IS NULL
CASE WHEN NULLIF(some_text, '') IS NULL THEN 'T' ELSE 'F' END
加载中,请稍侯......
精彩评论