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: trigger help please

Re: trigger help please

From: Michael Kuznetsov <mvk_at_servocomp.ru>
Date: 30 Sep 2002 06:36:06 -0700
Message-ID: <1543a3e7.0209300536.6a76c73c@posting.google.com>


Sorry Skippy, i've send you answer what belongs to others. About your question. I think you can solve your problem without database trigger. Oracle check links between tables automatically if you create foreign key constraint.

Michael Kuznetsov

mvk_at_servocomp.ru (Michael Kuznetsov) wrote in message news:<1543a3e7.0209300004.59117476_at_posting.google.com>...
> Hi Skippy,
>
> There is very old but easy way to copy table from one database to
> another. It's using COPY command from SQL*Plus.
>
> It is fragment from SQL*Plus documentation:
>
> The following command copies the entire EMP table to a table named
> WESTEMP.
> Note that the tables are located in two different databases. If
> WESTEMP already
> exists, SQL*Plus replaces the table and its contents. The columns in
> WESTEMP have the same names as the columns in the source table, EMP.
>
> SQL> COPY FROM SCOTT/TIGER_at_HQ TO JOHN/CHROME_at_WEST ->
> REPLACE WESTEMP ->
> USING SELECT * FROM EMP
>
>
> Regards,
> Michael
> Brainbench MVP for Oracle Programming
> http://www.brainbench.com
>
>
> "Skippy" <SkippyNOSPAM_at_hotmail.com> wrote in message news:<an86s2$3mo$1_at_slb7.atl.mindspring.net>...
> > I need to some help creating a trigger. I have a table and I need an insert
> > trigger when I try to insert something in table 1.. it makes sure that the
> > value exists in table 2.. more sepcifically.
> >
> > Table 2 is a list of courses and pre-requisites for each course.
> >
> > Table 1 is a registration table. The user should not be able to sign up for
> > a course if they have not taken the pre-requistie course
> >
> > Table 3 has the list of courses that the student has taken.
> >
> > thanks.
> >
> > skippy
Received on Mon Sep 30 2002 - 08:36:06 CDT

Original text of this message

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