real time applications of nullif?

Answers were Sorted based on User's Feedback



real time applications of nullif?..

Answer / babu

nullif basically allows you to compare 2 expressions of
same datatype and return null if both are equal. else it
would return the first expression.eg:
nullif(10,10) returns null

Is This Answer Correct ?    6 Yes 0 No

real time applications of nullif?..

Answer / rasmita basantia

The NULLIF function takes two arguments. If the two
arguments are equal, then NULL is returned. Otherwise, the
first argument is returned.

Is This Answer Correct ?    2 Yes 0 No

real time applications of nullif?..

Answer / avi007

In Oracle/PLSQL, the NULLIF function compares expr1 and
expr2. If expr1 and expr2 are equal, the NULLIF function
returns NULL. Otherwise, it returns expr1.

The syntax for the NULLIF function is:

NULLIF( expr1, expr2 )

expr1 and expr2 must be either numeric values or values
that are of the same datatype.

For example:

NULLIF(12, 12) would return NULL
NULLIF(12, 13) would return 12
NULLIF('apples', 'apples') would return NULL
NULLIF('apples', 'oranges') would return 'apples'
NULLIF(NULL, 12) would return an ORA-00932 error because
expr1 can not be the literal NULL

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Is sql a case sensitive language?

0 Answers  


In testing where do we use sql language and how it helps in testing?

2 Answers  


using comand prompt how can import table data and table space with example

2 Answers  


How does cross join work?

0 Answers  


How to get employee name from employee table which is the fiveth highest salary of the table

20 Answers   Infosys, Rolta,






What is trigger in pl sql?

0 Answers  


What is sql integrity?

0 Answers  


Practice 1: Changes to data will only be allowed on tables during normal office hours of 8.45 in the morning until 5.30 in the afternoon, MONDAY through FRIDAY. A. Create a procedure called SECURE_DML that prevents the DML statement from executing outside of normal office hours, returning the message: “you may only make changes during normal office hours” b. Create a statement trigger on the PRODUCT table which calls the above procedure. c. Test it by inserting a new record in the PRODUCT table.

1 Answers   Tech Mahindra,


What is recursive stored procedure?

0 Answers  


Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

0 Answers  


Which software is used for pl sql programming?

0 Answers  


How you improve the performance of sql*loader? : aql loader

0 Answers  


Categories