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
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 |
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 |
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 |
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 |
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 |
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 |
What are events in workflow manager?
comonly how meny mappings r there in Banking projects?
Can we update a target table (without primarykey) by using update strategy transformation?
scenario where i can use only concurrent execution of workflow.
Router T/R is active but some people are saying it is also passive which is exactly right?
what is the difference between lookupoveride and joiner?
How can we get multiple output values using an unconnected lookup transformation?
What is the difference between SOURCE and TARGET BASED COMMITS? What are the deliverables?in your project?
Partition, what happens if the specified key range is shorter and longer
Differnce between filter and router?
What happens if we dont select data driven option?
why do we go for update strategy tr in SCD rather using the session properties?