Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: update two oracle tables with single SQL Query?
On 16 abr, 13:17, "sybrandb" <sybra..._at_gmail.com> wrote:
> On Apr 16, 12:49 pm, "Mahesh" <registered.h..._at_gmail.com> wrote:
>
> > Hi All
> > I just need to know is it possibel to update two different tables in a
> > single SQL Query??
>
> > Thanks in advance
> > Maheshkumar
>
> You can update inline views
>
> update (select empno, ename, deptno, dname
> from emp, dept
> where emp.deptno = dept.deptno)
> set
>
> etc.
>
> --
> Sybrand Bakker
> Senior Oracle DBA
Sybrand.
Sure you can, but you can only update ONE of the underlying tables at a time.
(ORA-01776: cannot modify more than one base table through a join view)
Cheers.
Carlos Received on Mon Apr 16 2007 - 10:21:51 CDT
![]() |
![]() |