Search Interview Questions
Question: What does the following query do?
SELECT SAL + NVL(COMM,0) FROM EMP;
Answer: This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary.
|
|||||||||||
Question: What does the following query do? SELECT SAL + NVL(COMM,0) FROM EMP; Answer: This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary. Source: CoolInterview.com whrerever the commission is null, it is replaced by 0 & added to the salary. Source: CoolInterview.com ![]() ![]() NVL-by this we replace the null value by 0,if we will not do this then any operation by null result will be null,if we'll not convert this , and comm is null then always the addition of sal+comm will be null. Source: CoolInterview.com ![]() ![]() This will display salary + Commission for all emp. for records with no comm it will give only the salary Source: CoolInterview.com ![]() ![]() SELECT SAL + NVL(COMM,0) FROM EMP ![]() ![]() The NVL function is used to replace NULL values by another value. ![]() ![]() If you have the better answer, then send it to us. We will display your answer after the approval Rules to Post Answers in CoolInterview.com:-
|
Related Questions | ||
Which date function is used to find the difference between two dates? |
|
|
Why does the following command give a compilation error? DROP TABLE &TABLE_NAME; |
|
|
What is the advantage of specifying WITH GRANT OPTION in the GRANT command? |
|
|
What is the use of the DROP option in the ALTER TABLE command? |
|
|
What is the value of comm and sal after executing the following query if the initial value of ?sal? is 10000 UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1; |
|
|
What is the use of DESC in SQL? |
|
|
What is the use of CASCADE CONSTRAINTS? |
|
|
Which function is used to find the largest integer less than or equal to a specific value? |
|
|
What is the output of the following query SELECT TRUNC(1234.5678,-2) FROM DUAL; |
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All SQL Interview Questions & Answers - Exam Mode / Learning Mode
India News Network |