Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: update two oracle tables with single SQL Query?

Re: update two oracle tables with single SQL Query?

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 16 Apr 2007 08:21:51 -0700
Message-ID: <1176736911.919307.46750@n59g2000hsh.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US