DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Triggers..

  1. #1
    Join Date
    Oct 2000
    Posts
    449
    Hi DBAs:
    I have a table that has 5 fields of which the 5th field is status and is default 'ACTIVE' when inserted. But when someone deletes, I want the row to be there and make it inactive for status. I hope I am clear.

    How would you write the trigger..


    SQL> desc tbl_applist
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    APPLICATION_ID NOT NULL VARCHAR2(10)
    BWPERSEC NUMBER(5)
    APPLICATION_IP VARCHAR2(23)
    APPLICATION_PORT NUMBER(5)
    STATUS VARCHAR2(10)

    SQL> select * from tbl_applist;

    APPLICATIO BWPERSEC APPLICATION_IP APPLICATION_PORT STATUS
    ---------- ---------- ----------------------- ---------------- ----------
    3 2 ACTIVE
    4 2 ACTIVE

    Thanks..

  2. #2
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    342

    Smile

    create an 'INSTEAD OF' trigger on the table

    Hope this helps
    Gert

  3. #3
    Join Date
    Jul 2000
    Posts
    296
    instead of triggers cannot be created on tables, only on views.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width