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

I have a text file name x With a text message. Word informatica Is repeated for n number of times. How to count the number of occurrence Of word informatica Of word informatic in this file x.

1 Answers   Wipro,


how can u connect client to ur informatica sever iff server is located at different place( not local to the client)

3 Answers   Accenture,


surrogate keys usage in Oracle and Informatica?

5 Answers   ITC Infotech, Oracle,


Define Pmrep command?

0 Answers  


connected and unconnected lookups?

4 Answers  






If we have a two tables A & B A contain 10 records,B contain 20 records,what w'll b the o/p if we perform normal join,Master outer join,Detail outer join and Full Outer join how?

1 Answers   TCS,


we r using aggregator with out using groupby?

7 Answers   HSBC, Principal Finance,


What is a data modeling?

2 Answers  


what is mystery dimension?

1 Answers  


What is the Rankindex in Ranktransformation?

7 Answers  


Workflow is long running due to long running sql query so when we refer the query plan it tells the issue is due to partition of the db table. How to handle this?

0 Answers  


What are set operators in Oracle

3 Answers   Deloitte, Wipro,


Categories