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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -