Search
 
SCRIPT & CODE EXAMPLE
 

SQL

difference between nvl and nvl2 in oracle

/*
NVL checks if first argument is null and returns second argument.

NVL2 has different logic. If first argument is not null 
then NVL2 returns second argument, but in other case it will 
return third argument.
*/

select nvl(null, 'arg2') from dual
-- Result: arg2;
select nvl2('arg1', 'arg2', 'arg3') from dual 
-- Result: arg2
select nvl2(null, 'arg2', 'arg3') from dual
-- Result: arg3
Comment

PREVIOUS NEXT
Code Example
Sql :: sqlite escape single quote 
Sql :: plsql regex match whole word 
Sql :: drop tables from local table database postgres 
Sql :: How to group by week (7 days) in SQL Server 
Sql :: HOW TO RETURN THE NUMBER OF LETTERS IN A cell in mysql 
Sql :: sql "List the contact methods found in the Contact table.For each contact method, list how many people chose that contact method." 
Sql :: azure sql-datenbank 
Sql :: funktion LOWER/UPPER sql 
Sql :: mysql faster delete 
Sql :: how to type a blank discord messgae 
Sql :: add two days to current date in sql when creating tables 
Sql :: oracle synonym procedure dblink 
Sql :: hibernate xml property MySQL url, username and password 
Sql :: get many value to 1 column sql 
Sql :: show * from table mysql 
Sql :: how to check table engine in mysql 
Sql :: flashback in bigquery 
Sql :: oracle 11g forget password 
Sql :: sqlite display headers on columns 
Sql :: sql server o arquivo solicitado não pode ser baixado 
Sql :: How to get number of months between 2 dates sql server 
Sql :: oracle find constraints referencing a table 
Sql :: is not null mysql 
Sql :: bigquery javascript 
Sql :: check if two tables are identical sql 
Sql :: jooq finding lastest value in table 
Csharp :: c# hello world program 
Csharp :: how to edit text mesh pro text 
Csharp :: open url in c# 
Csharp :: c# store strings in file 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =