real time applications of nullif?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Is sql a case sensitive language?
In testing where do we use sql language and how it helps in testing?
using comand prompt how can import table data and table space with example
How does cross join work?
How to get employee name from employee table which is the fiveth highest salary of the table
What is trigger in pl sql?
What is sql integrity?
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.
What is recursive stored procedure?
Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?
Which software is used for pl sql programming?
How you improve the performance of sql*loader? : aql loader