sql query output using if statement or switch case
Suppose i run a query
select open_mode from v$database
if it returns READ WRITE, output should return OK
otherwise output should return NOT OK.
also
if i run a query for table-space size check
& output is less than 90 percent value, output should return OK otherwise NOT OK.
I hope this can be achieve using if statement or switch case in ORACLE SQL query or at .sh file (shell scripting) level.
Need your inputs ?
for customized oracle database health check up report purpose