plsql - PL/SQL: Does SELECT INTO give the variable NULL if the value is NULL in the table? -


i ask question because trying make function returns value based on if selected information in table null or not. however, cannot argument in if statement true.

so, have varchar2 variable prepared, , use select statement

select info lv_test ...  if lv_test != null     --do not null stuff else     --do null stuff 

now, in code use specifically, values lv_test, unless check them directly, if lv_test = 'ny', becomes true , works, won't become true. not work whenever check null values, nor work if check = '' (initialized/default value).

my experience in sql limited basic don't know yet. answer questions:

  1. how check null values select ... ... statement?
  2. why argument not work?


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -