If sal is null then replace it with min(sal). Can any one
write a query for this in oracle ?

Advance Thanks

Answers were Sorted based on User's Feedback



If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / madhu

here is the query
update emp set sal =(select min(sal) from emp) where sal is null

Is This Answer Correct ?    9 Yes 0 No

If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / ramesh 9866930212

select min(decode(sal,null,(select min(sal) from emp))) sal
from emp group by empno;

Is This Answer Correct ?    4 Yes 2 No

If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / abc

update emp_test set comm=(select min(sal) from emp_test)
where comm is null;

Is This Answer Correct ?    1 Yes 0 No

If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / amol m

SELECT DECODE(w.salary,NULL,(SELECT MIN(e.salary) FROM
employees e),w.salary) FROM employees w

Is This Answer Correct ?    1 Yes 0 No

If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / priyank

select (case when sal is null then (select min(sal) from
emp) end) from emp

Is This Answer Correct ?    1 Yes 0 No

If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / eval

update emp_test set comm=(select min(sal) from emp_test)
where comm is null;

Is This Answer Correct ?    0 Yes 0 No

If sal is null then replace it with min(sal). Can any one write a query for this in oracle ? Ad..

Answer / basavan

select nvl(sal,min(sal) from <table name>

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More Informatica Interview Questions

what are the deliverables?in your project?

0 Answers   DELL,


How to display First letter of Names in Caps?

7 Answers  


After a load is done to my target table, I need to insert a last row, which might be formed at some expression transformation and brought to target. Do I have to have separate mapping to be run after the 1st mapping? Or in a single mapping how to achieve this?

3 Answers   TCS,


what is difference between mapping and mapplet ?

2 Answers   TCS,


What is the difference between sequential batch and concurrent batch and which is recommended and why?

1 Answers  


every DWH must have time dimension so now what is the use of the time dimension how we can calculate sales for one month,half-yr'ly,and year'ly?how we are doing this using time dimension.

1 Answers   IBM,


What is the difference between IN and Exists in Oracle?

4 Answers   Deloitte,


How/where can i install Informatica software with oracle or teradata as database

0 Answers  


Please tell me which institute is the best to study Informatica and asp.net in chennai Also please send me the latest interview questions in asp.net,c# and sql server to my id ramtryin@gmail.com

0 Answers  


i want to load data in to two targets..one is dimension table and the other is fact table?how can i load ata a time

3 Answers   iGate,


What is informatica etl tool?

0 Answers  


I have source like col1,col2,col3,col4 and the values are like 3,6,1,7 1,5,3,8 2,1,5,6 i want the output like 3,6,7 5,3,8 2,5,6 How we will achieve in this scenario in informatica level. Please help me.. Thanks in advance..

4 Answers   Wipro,


Categories