Re: Writting Trigger

From: joel garry <joel-garry_at_home.com>
Date: Tue, 29 Nov 2011 09:09:57 -0800 (PST)
Message-ID: <e3e93a8f-83b4-489e-84df-48f548d0ecc5_at_f3g2000pri.googlegroups.com>



On Nov 29, 4:30 am, "KonradWo" <kon..._at_a.pl> wrote:
> I have table and i dont know how to write trigger to this table
>
> Table:
> CREATE TABLE TAB1
> (
>   ID      NUMBER(9),
>   ID2     VARCHAR2(20)
> )
>
> Valuses:
>
> INSERT INTO TAB1 VALUES (1,'')
> INSERT INTO TAB1 VALUES (2,'')
> INSERT INTO TAB1 VALUES (3,'')
> INSERT INTO TAB1 VALUES (4,'')
>
> Single update:
> UPDATE TAB1
>  SET
> ID2 = ('TEXT' || (SELECT ID FROM TAB1 WHERE ID=1))
>  WHERE ID=1
>
> I have a question:
> How to update whole table based on "Single update" ?
>
> I need help with writeing trigger based on "Single update" to automate this process.
>
> I will be very grateful for your help
>
> --------------=  Posted using GrabIt  =----------------
> ------=  Binary Usenet downloading made easy =---------
> -=  Get GrabIt for free fromhttp://www.shemes.com/ =-

It sounds like a singularly bad idea, but I'll just ask, what exactly are you trying to accomplish? The docs have the syntax.

jg

--
_at_home.com is bogus.
http://www.theregister.co.uk/2011/11/28/javafx_2_point_0_part_three/
Received on Tue Nov 29 2011 - 11:09:57 CST

Original text of this message