I have 2 tables Emp1(empid,salary),Emp2(empid, salary). I want to update salary of Emp1, based on the empid.
Salary of Emp2 will be updated on Emp1's salary column. I am using this query to update salary of Emp1 table.
UPDATE emp1 SET salary =
(SELECT salary FROM emp2 e2 WHERE e2.empid = emp1.empid AND
rownum < 2);
The above query is working fine. Is there any alternate solution to update the emp1 table without using rownum?
Kindly share your views, Thanks in advance.