-
hi
I WANNA UPDATE THE SALARY OF ALL THE EMPLOYEES WHO ARE COMMON IN BOTH THE TABLES.
MY 1 TABLE IS EMP & THE 2 TABLE IS DEPT
THE COMMON FILEDS ARE DEPTNO
I WANT TO UPDATE THE SALARY OF THOSE EMPLOYEES PRESENT IN BOTH THE TABLES.
(EG) SAY DEPTNO = 10
JEGAN
-
hi,
i hope you have a realation betn two tables.
update emp set sal=123 were emp.deptno=dept.deptno .
-
hi :)
this code is not working
this the error iam getting:
update empbak set sal=123 where empbak.deptno = deptbak.deptno
*
ERROR at line 1:
ORA-00904: invalid column name
write back
-
update emp set sal=sal*2 where deptno in (select deptno from dept);
The reason you get that error is that Oracle has no idea what deptbak.deptno is, since it isn't (and can't be) listed as the table to update.
[Edited by kmesser on 04-28-2001 at 10:01 AM]