Trigger for insertion post

Hi all

I want to update a column on the newly inserted row. So I wrote a trigger on the table, but it does not update the current row. For example

If there were two rows of the table with the same criteria, two were created a minute ago, trigger will update the two lines but not the current.

No idea how to upgrade the new line. I think that AFTER insertion, row trigger should be available in the table and must be updated, but is not.

Thank you

John

user12294561 wrote:

I want to update a column on the newly inserted row. So I wrote a trigger on the table, but it does not update the current row. For example

Etc...

You need a BEFORE INSERT... FOR EACH type of trigger.
: p

Tags: Database

Similar Questions

  • FRM-40735: trigger for INSERTION after raised unhandled exception ORA-25207

    Hello
    I am trying to create custom applications. In that when creating custom responsibility I get the following error
    FRM-40735: trigger for INSERTION after raised unhandled exception ORA-25207

    I know ORA-25207 is related to the activation of the queues, but how do I find out which queue this error is ponting at.

    File alertlog Checked, $APPLCSF / $APPLLOG found nothing.

    Any help is appreciated

    Concerning
    Taher

    PL see if the steps described in MOS Doc 211095.1 (11, 5 - AP: Frm-40735: trigger of sur-Commit not triggered managed Ora - 25207 Exception on APXPAWKB) can help.

    It is an odd error and should not occur when you create custom responsibilities. You have customizations/triggers/customizations enabled on the form of accountability?

    HTH
    Srini

  • trigger for insertion of a table to another table

    Hello again,

    I tried to write a trigger after insert or update will happen in table 1, it will move some values in another table, as shown below:

    Create or replace trigger Insert_Amount_Credit after insert or update on Reciept_Voucher

    Referencing NEW AS NEW OLD OLD FOR EACH LINE AS
    Start

    Insert into customer_Details (Transaction_Date, client_name, Description, credit) values (new. Rec_Date, new. Client_name, CONCAT (' receipt number:', again.) Rec_ID), new. Amount);

    End;

    /

    The trigger was created but with compilation error... and my question is:

    1. How do I write the code above in the best way?

    2. How can I enough the other table with a table concatenated as what I was trying to make above?

    any idea?

    Something like that?

    CREATE OR REPLACE TRIGGER trig_ins_testtrg2

    BEFORE INSERT OR UPDATE ON test_trg1

    FOR EACH LINE

    BEGIN

    INSERT INTO test_trg2 (curr_date,

    job_id,

    reason,

    credit)

    VALUES (SYSDATE,

    : NEW.id,.

    : NEW.receipt_no |:NEW.description,.

    (: NEW.amount);

    END;

  • Trigger for INSERTION OF THE COLUMN exists?

    Hello Experts

    I just wonder that relaxation of the COLUMN INSERT exists as UPDATE OF THE COLUMN? If so, it seems illogical to use insert the trigger. Because can not insert for a spesific columns that we effect the registration worldwide, right line?

    Thank you

    PRIOR TO INSERTION OF THE MEMBER ON AVLMEMBERS ID

    Don't have compile this code of yours? View the results of the compilation of this trigger.

    There is NO such syntax as a review of the language PL/SQL doc will show you

    CREATE TRIGGER statement

    dml_event_clause

    Specifies the trigger instructions for simple_dml_trigger or compound_dml_trigger . The database enables the trigger in the existing user transaction.

    DELETE

    Causes the database to activate every time a DELETE statement drops a line to table or table on which view is defined.

    INSERT

    Causes the database to activate every time a INSERT statement adds a line to table or table on which view is defined.

    UPDATE [columns [, column]]

    Causes the database to activate every time a UPDATE statement changes a value in a specified column. Default: the current database the trigger every time that a UPDATE statement changes a value in a column of table or table on which view is defined.

    If you specify a column , then you cannot change its value in the body of the trigger.

  • ORA-01461: can bind to a LONG value only for insert into a LONG column

    Hello

    Oracle XE on RHE dedicated server
    create table cvDetails(
    cd_id number(14) primary key,
    cv_id number(14) constraint education_fk references CvProperties(cv_id),
    nationality varchar2(230),
    objectives varchar2(3900),
    name varchar2(230),
    fatherName varchar2(230),
    motherName varchar2(230),
    dob varchar2(230),
    gender varchar2(230),
    mStatus varchar2(230),
    passportNo varchar2(110),
    email varchar2(230),
    phone varchar2(45),
    mobile varchar2(25),
    address varchar2(2500),
    state varchar2(230),
    zipCode varchar2(230),
    city varchar2(230),
    education clob,
    experience clob,
    skills clob,
    languages varchar2(1400),
    hobbies varchar2(3200),
    achievements varchar2(3900),
    references varchar2(3900)
    );
    
    create sequence cvDetails_seq
    start with 1 increment by 1;
    
    create or replace trigger cvDetails_trig
    before insert on cvDetails
    referencing new as new
    for each row
    begin 
    select cvDetails_seq.nextval into :new.cd_id from dual;
    end;
    /
    Why do I get the error of subject?

    Thank you in anticipation

    >
    in any case, I checked manually according to your instructions and found that this objective column is of character input more than specified.
    >
    Glad you found the problem, but I hope that you learned a lesson that is time consuming.

    It must be remembered that we have no access to your environment. If we do not know which servers, clients, tables and users that you use.
    It may seem simple to you but doesn't realize that you provide us with two slightly different versions of the cvDetails table.

    The original post had this
    >
    objectives varchar2 (3900).
    >
    But when you have provided your 'cvDetails desc' journal text has
    >
    OBJECTIVES VARCHAR2 (3950)
    >
    It is the same table that you started with how the column suddenly grow 50 bytes?
    This means that you did from different parts of the present in the two schemas or on two servers or you change the table between the two.

    You can't address properly when you do this. By chance it is the column that you said is now the problem.
    In SQL, the maximum length of a VARCHAR2 is 4000 bytes; no characters but bytes. Nothing more than 4000 bytes would probably be a LONG in the generic sense.

    If your error
    >
    Re: ORA-01461: can bind to a LONG value only for insert into a LONG column
    >
    means that you try to 'bind a LONG value' to a column VARCHAR2 and you can't you can 'bind a LONG value only for insert in a LONG column.

    In the proper context, the error makes sense.

    You probably have a problem with

     ps.setString(2,  objectives);
    

    because the 'objectives' has a length of more than 4000 bytes.

    Remember this answer from you?
    >
    I have read and found that there may be a problem with the driver JDBC or Characterset. Am I wrong?
    >
    The 'Hello' ASCII string is five characters and five bytes because the ASCII code is a set of characters in a single byte. The same string internally in Java is five characters but ten bytes because Java uses UTF16.

    So, if the character set of the data itself is double-byte character set then anything more than 2000 characters (4000 bytes) is a "LONG". And if your column is defined as VARCHAR2 (3950), which means bytes a doublel-byte character set which are characters of 1975.

    Then you said in a response later
    >
    I checked by the SNA Server and oracle that are both of the same but new thing I found is that oracle does not allow more than one clob column in a table. Is this true?
    >
    Somehow a hypothesis has crept it that the problem was not a driver JDBC or Charaterset, but because you can not have more than one clob column in a table.

    You could have easily tested for yourself by doing what P. Forstmann - tried to create a table and see.

    Then you completely ignored my advice
    >
    I suggest to you isolate the columns actually causing the problem.
    Change your code to insert only a few columns. When it works, add more than a few columns.
    This will then tell you which column or the columns are at the origin of the problem.
    Display the results once you determine a column that causes the error.
    >
    When you have finally made the simplest things, you have found what was causing the problem almost immediately.

    Many times you don't need 'experts' - you must use a rigorous, methodical, process step by step.

    ALWAYS, ALWAYS, ALWAYS reduce the simplest possible code example that illustrates the problem.
    If you had followed this a rule would have probably found you the problem and makes you look like the 'expert '.

    There are no shortcuts.

  • Problem with trigger AFTER INSERT

    Hi all

    I am updating a column in the table by adding 2 characters 'a_' after INSERTION using the trigger.

    Now when I insert data in the table a trigger is fired for INSERTION.
    According to the syntax, I think that we cannot pass parameters in a trigger.
    I have a test10 table that looks like this.
    t1    varchar2(10)
    t2    varchar2(10)
    t3    varchar2(10)
    t4    number
    t5    number
    
    t1 is kinda primary_key and t2 is unique though the table isn't structured like that but the data in it follows that.
    The code in the trigger looks like this 
    
    CREATE OR REPLACE TRIGGER test10_t1 
      AFTER INSERT 
      ON test10 
      FOR EACH ROW
    BEGIN
      IF INSERTING THEN
        UPDATE test10 SET t1 = 'a_'||:old_value WHERE t1 = ?;  -- I need to mention the parameter here but not sure if we can pass param in a trigger 
      END IF;
    END;
    If I omit the WHERE clause, all records are updated. Is there another way to solve the problem?

    THX
    Rod.

    There is no need to use a clause of update.

    Have you tested the relaxation that I suggested in my last post?

  • trigger for update field in a table with the sum of the fields to another table

    My experience in creation of triggers and pl/sql in general can be described in terms of oracle with the null value. I practiced by creating arrays and applications on my personal server at home to help me with some of my work related tasks. Right now I am creating a trigger which will, after insert, update, delete on the update of the table assignment_time_track the area of the time_spent on the table of assignments with the sum of the time_spent on the assignment_time_track table fields. I hope that run on the sentence it is clear to the people other than me. I tried this script on my own using the tool of creation of trigger for Oracle Database Express Edition, but I get the following error:

    Create a trigger failed, for the following reason:
    ORA-06552: PL/SQL: ORA-06553 finished Compilation unit analysis: PLS-320: the declaration of the type of the expression is incomplete or incorrect

    Here is my attempt to create the trigger on my own.

    create or replace trigger "ASSIGNMENT_TIME_TRACK_T1".
    AFTER
    INSERT or update or delete on 'ASSIGNMENT_TIME_TRACK '.
    for each line
    Start
    update assignments
    Set time_spent = (select sum (time_spent)
    of assignment_time_track
    where assignment_time_track.name = assignments.name);

    end;
    /


    If what I posted is not clear or more detail is needed, let me know and I will respond with a full description of tables and my goals for each table. Thanks in advance for any help. I also gladly accepts links to tutorials or lessons that explain how to do this kind of thing.

    Published by: bobonthenet on March 9, 2009 14:01

    I think I understand what you mean :)

    Rather than use a trigger to keep the master table (assignments) in sync with the time spent on the details, it would be much easier to use a query to do this, maybe creating a view.

    Something along the lines of

    SQL> create table assignments
      2  (id number primary key
      3  ,name varchar2(10)
      4  );
    
    Table created.
    
    SQL>
    SQL> create table assignment_time_tbl
      2  (id number primary key
      3  ,assid number references assignments
      4  ,time_spent number
      5  );
    
    Table created.
    
    SQL>
    SQL> insert into assignments
      2  select rownum
      3       , 'a'
      4    from all_objects
      5   where rownum < 5
      6  /
    
    4 rows created.
    
    SQL>
    SQL> insert into assignment_time_tbl
      2  select rownum
      3       , rownum
      4       , rownum * 3
      5    from all_objects
      6   where rownum < 5
      7  /
    
    4 rows created.
    
    SQL>
    SQL> commit;
    
    Commit complete.
    
    SQL>
    SQL>
    SQL> select a.id
      2       , a.name
      3       , (select sum (time_spent)
      4            from assignment_time_tbl
      5           where assid = a.id
      6         )
      7    from assignments a
      8  /
    
            ID NAME       (SELECTSUM(TIME_SPENT)FROMASSIGNMENT_TIME_TBLWHEREASSID=A.ID)
    ---------- ---------- -------------------------------------------------------------
             1 a                                                                      3
             2 a                                                                      6
             3 a                                                                      9
             4 a                                                                     12
    
  • How to write the trigger for update or delete multiple columns in a table?

    Hello

    I create one in the form of table of sample_emp. In that, every time I want to change of name, team_id, team_leader_id, supervisor_id, manager_id it must store the update-able and old values of those in the job_history table. When I write the trigger for which it shows "ORA-04082 new or the old value not table level triggers. Here is my emp_table. My table also similar job_history like this. Need your help.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9
    EMP_IDEMP_NAMEDESIGNATIONTEAM_IDTEAM_LEADER_IDEMPLOYEEMANAGER_IDHIRE_DATERELIEVED_DATE

    --

    Thank you.

    Hi Joel,.

    Venky_prs wrote:

    Hello

    I create one in the form of table of sample_emp. In that, every time I want to change of name, team_id, team_leader_id, supervisor_id, manager_id it must store the update-able and old values of those in the job_history table. When I write the trigger for which it shows "ORA-04082 new or the old value not table level triggers. Here is my emp_table. My table also similar job_history like this. Need your help.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9
    EMP_ID EMP_NAME DESIGNATION TEAM_ID TEAM_LEADER_ID EMPLOYEE MANAGER_ID HIRE_DATE RELIEVED_DATE

    --

    Thank you.

    You can try something like this given below to complete the historical table on update and delete.

    create or replace TRIGGER  "CLONE_EMP_UPDATE_DELETE"
    BEFORE DELETE OR UPDATE ON EMP
    FOR EACH ROW
    DECLARE
        PRAGMA autonomous_transaction;
    BEGIN
    INSERT INTO JOB_HISTORY("EMP_ID","EMP_NAME","DESIGNATION","TEAM_ID","TEAM_LEADER_ID","SUPERVISOR_ID","MANAGER_ID"
    ,"HIRE_DATE","RELIEVED_DATE")
      VALUES(:OLD.EMP_ID,:OLD.EMP_NAME,:OLD.DESIGNATION,:OLD.TEAM_ID,:OLD.TEAM_LEADER_ID,:OLD.SUPERVISOR_ID,
    :OLD.MANAGER_ID,:OLD.HIRE_DATE,
    :OLD.RELIEVED_DATE);
    COMMIT;
    END;
    

    Hope this helps you,

    Kind regards

    Jitendra

  • Create the trigger for multiple users

    I am trying to create a trigger for a DDL event which gives an error for 2 users when they try to create a database object or a table.

    Here is my code. When ran it gives me the following error: "WARNING: trigger created with errors of complication."

    Any idea would be appreciated.

    Thank you!

    CREATE OR REPLACE TRIGGER trigger_before_create_object
    BEFORE YOU CREATE ON THE DATABASE

    BEGIN

    IF USER = USER OR "VPD_CLERK1" = "DBSEC_CLERK."
    THEN
    RAISE_APPLICATION_ERROR (' you do not have the privilege to create tables or other database objects.) Contact your administrator if you need the privilege. ") ;
    END IF;
    END;

    Published by: mkmety on April 20, 2013 12:10

    Welcome to the forum!

    Whenever you post provide your Oracle version 4-digit
    >
    I am trying to create a trigger for a DDL event which gives an error for 2 users when they try to create a database object or a table.

    Here is my code. When ran it gives me the following error: "WARNING: trigger created with errors of complication."

    Any idea would be appreciated.

    Thank you!
    >
    And to alert you to the need to view the errors you got. If you did you will see this:
    >
    PLS-00306: wrong number or types of arguments in the call to "RAISE_APPLICATION_ERROR.
    >
    Oracle cannot raise your exception if you:

    1. do not define an exception to throw
    2. don't tell Oracle how exception to throw

    See the section "Defining your own Error Messages (procedure RAISE_APPLICATION_ERROR)" in the doc of the PL/SQL language
    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/errors.htm#i1871

    This article has examples that show how to raise your exceptions.

  • Trigger AFTER INSERT or UPDATE run twice

    Hi people! I have a problem with this trigger, if I insert a record, INSERTING run 2 times still, I guess that the problem is in AFTER INSERTION or UPDATE of THE SAL ON EMP, but I can't find the solution, I m used to read a lot but nothing... Any idea? Thank you and sorry my bad English.

    PD: I use oracle database 9i 9.2.0.1.0 enterprise

    CREATE OR REPLACE TRIGGER TEMA10EJER1
    AFTER INSERTION OR UPDATE OF THE SAL ON EMP
    FOR EACH LINE
    BEGIN
    IF THE INSERTION
    UPDATE DEPT
    PRESUPUESTO SET = PRESUPUESTO +: new.sal
    Where: new.deptno = deptno;
    ELSIF UPDATING ('sal') THEN
    UPDATE dept
    Presupuesto SET = presupuesto -: old.sal +: new.sal
    WHERE: new.deptno = deptno;
    END IF;
    END;

    Check your DEPT table, may be there is another trigger that inserting a new record.

  • How can I write the trigger for the global temporary Table

    Hi Grus,
    How can I write the trigger for the global temporary Table.

    I created the TWG with trigger using the script below.


    CREATE A GLOBAL_TEMP GLOBAL TEMPORARY TABLE
    (
    EMP_C_NAME VARCHAR2 (20 BYTE)
    )
    ON COMMIT PRESERVE ROWS;


    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE, UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERRING AGAIN AS NINE OLD AND OLD
    FOR EACH LINE
    BEGIN
    INSERT INTO VALUES EMPNAME (: OLD.) EMP_C_NAME);
    END;
    /


    trigger was created successfully, but her would not insert EMPNAME Table...

    Please guide if mistaken or not? If not wanting to give a correct syntax with example


    Thanks in advance,
    Arun M M
    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    
    you are referencing old value in insert stmt.
    
    BEGIN
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    END;
    

    then run your app, it works very well...

    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    (
    EMP_C_NAME VARCHAR2(20 BYTE)
    )
    ON COMMIT PRESERVE ROWS;
    
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    dbms_output.put_line(:OLD.EMP_C_NAME||'yahoo');
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    dbms_output.put_line(:OLD.EMP_C_NAME);
    END;
    /
    
    create table EMPNAME as select * from GLOBAL_TEMP where 1=2
    
    insert into GLOBAL_TEMP values('fgfdgd');
    commit;
    select * from GLOBAL_TEMP;
    select * from EMPNAME;
    
    output:
    1 rows inserted
    commit succeeded.
    EMP_C_NAME
    --------------------
    fgfdgd               
    
    1 rows selected
    
    EMP_C_NAME
    --------------------
    fgfdgd               
    
    1 rows selected
    

    He got Arun

    Published by: OraclePLSQL on December 28, 2010 18:07

  • Trigger after insert

    After an insertion in table 1, I want to take the value of the transaction and use it in a custom to insert trigger in an another datbase 2 values. One is the primary key of the table 1 transaction value and the other is a variable of the connected user's session. I can get the value of the user of the session, but I can't get the value of the transaction field.

    $updateRequestDate = "INSERT INTO request_notify (id_request, username) Values ({rsrequest.id_request}," ".). $_SESSION ["kt_login_user"]. "')";
    $update_result = $tNG-> connection-> execute ($updateRequestDate);
    {if(!$update_result)}
    $updateError = new tNG_error ("' error affecting the logged in State to N ', array(), Array();")
    Return $updateError;
    } else {}
    return null;
    }

    I have the custom trigger after insert transaction.

    How do you get the value of a transaction for a custom trigger field?

    Please try with the help of the

    $tNG-> getColumnValue ("column_name")

    method instead.

    See you soon,.

    Günter

  • How can simple trigger for verification of status update on the table... - I get upd sql then?

    Hi guys,.

    I need to do a temporary simple audit on all updates on a table.

    That's why I create a trigger for her...

    However, I need to capture the SQL statement to make the update as well... However I have no way to do it, because it is always replaced by a SQL code I run to get the SESSION ID...

    Here is the trigger...
    ----------------------

    create or replace
    alert_setting_trg relaxation
    before the update on user_alert_settings
    for each line
    declare
    number of v_sid;
    v_username varchar2 (100);
    v_osuser varchar2 (100);
    v_machine varchar2 (100);
    v_program varchar2 (100);
    v_module varchar2 (100);
    v_prevsqlid varchar2 (100);
    v_sqltext varchar2 (100);

    Start
    SELECT SYS_CONTEXT ('USERENV', 'SID')
    IN v_sid
    FROM DUAL;

    SELECT the username, osuser, machine, program, module, PREV_SQL_ID
    IN v_username, v_osuser, v_machine, v_program, v_module, v_prevsqlid
    SESSION $ v where SID = v_sid;

    SELECT sql_text
    IN v_sqltext
    V $ sqltext
    WHERE SQL_ID = v_prevsqlid;

    INSERT INTO alert_settings_log
    VALUES (sysdate, v_sid, v_username, v_osuser, v_machine, v_program, v_module, v_sqltext,: new.user_id,: new.service_grp,: new.alert_setting_id,: old.alert_active,: new.alert_active);

    end;


    Now the problem is that...
    the capture of SQL statement will always be

    SELECT SYS_CONTEXT ('USERENV', 'SID')
    IN v_sid
    FROM DUAL;


    and not the UPDATE table statement.

    1st quarter) I have to get the SID of the session before I could know what SQL it is running.

    However, once I get the SID, the SQL to UPDATE the SID is run changes the SQL that gets the SID.

    What can I do?

    Rgds,
    Noob

    Instead of to the request in three steps, do it in 1. Replace all three of your queries with something like:

    SELECT s.username, s.osuser, s.machine, s.program, s.module, q.sql_text
    INTO v_username, v_osuser, v_machine, v_program, v_module, v_sqltext
    FROM v$session s, v$sql_area q
    WHERE s.sid = SYS_CONTEXT('USERENV','SID') and
          s.prev_sql_id = q.sql_id
    

    John

  • Trigger to insert data

    I had created a trigger to insert amendments. in the order in the column CRI_SEQ in the CM_RECIPE_ITEM table. But each insertion into a table, the CRI_seq not. not get incremented by 1.

    CREATE OR REPLACE TRIGGER COSTMAN. "" CM_RECIPE_ITEM_T1 ".
    INSERT BEFORE "CM_RECIPE_ITEM".
    FOR EACH LINE
    DECLARE
    NUMBER OF L_ID;
    NUMBER OF SEQ;
    BEGIN
    IF THE INSERTION
    IF: NEW. CRI_ITEM_ID IS NULL THEN
    : NEW. CRI_ITEM_ID: = CM_RECIPE_ITEM_SEQ. NEXTVAL;
    END IF;
    : NEW. CRI_CR_ON: = SYSDATE;
    : NEW. CRI_CR_BY: = nvl (v ('APP_USER'), USER);
    SELECT (NVL (MAX (CRI_SEQ), 0) + 1) IN SEQ
    OF CM_RECIPE_ITEM
    WHERE CRI_ITEM_ID =: NEW. CRI_ITEM_ID;
    : NEW. CRI_SEQ: = SEQ;
    END IF;
    IF THE UPDATE CAN
    : NEW. CRI_UPD_ON: = SYSDATE;
    : NEW. CRI_UPD_BY: = NVL (v ('APP_USER'), USER);
    END IF;
    END;
    /

    Kindly advice what changes to make in the trigger to solve this problem.

    Yogesh

    Hello

    What is the error?

    You missed the semicolon

    SELECT (NVL(MAX(CRI_SEQ),0)+1)
    INTO SEQ
    FROM CM_RECIPE_ITEM;
    

    BR, Jari

  • Create the trigger after insert

    Hello

    I would like to ask how to create a trigger after insert on a table. Basically, what I wanted to do are when an insert to table1 it will insert the records to table2. But the problem is that folders that will be inserted in the new tables are entries/fields, who lived in NEW York City (on table of ld)

    after insertion, I wanted to add another field in table2 as status


    create table table1)

    Name varchar2 (55),
    City varchar2 (55)

    );

    create (table2)

    Name varchar2 (55)
    status int (1)
    )

    Hope you could help me.

    Thank you

    Best regards

    antok1015 wrote:
    Hello

    I would like to ask how to create a trigger after insert on a table. Basically, what I wanted to do are when an insert to table1 it will insert the records to table2.

    It's easy...

    SQL> create table table1(
      2    Name varchar2(55),
      3    City varchar2(55)
      4  );
    
    Table created.
    
    SQL>
    SQL> create table table2 (
      2    Name varchar2(55),
      3    status number(1)
      4  );
    
    Table created.
    
    SQL>
    SQL> create or replace trigger trg_tbl1 after insert on table1
      2  for each row
      3  begin
      4    insert into table2 values (:new.name, 1);
      5  end;
      6  /
    
    Trigger created.
    
    SQL> insert into table1 values ('Fred','Bob');
    
    1 row created.
    
    SQL> select * from table2;
    
    NAME                                                        STATUS
    ------------------------------------------------------- ----------
    Fred                                                             1
    
    SQL>
    

    But the problem is that folders that will be inserted in the new tables are entries/fields, who lived in NEW York City (on table of ld)

    after insertion, I wanted to add another field in table2 as status

    This is not sensible. Please explain what you mean.

Maybe you are looking for

  • bug report

    Hello How can I report bugs?

  • Information inside the urlclassifier.sqlite

    Does anyone know if this file can be of any help, trying to find the browsing history? He was erased on my PC and it is the only file that has not been affected. Also, when the Firefox cache is deleted, can it be moved using a hard disk removal tool?

  • CanoScan 9000F vs El Capitan 10.11.3

    New update knocked out my scanning software. [CanoScan 9000F]  Just Canon updated 12/15/15 for 10.11, but now a 10.11.3 update is necessary?  Is there a work-a-round without having to completely reconfigure my operating system for a sweep of the base

  • Question to a potential buyer!

    Hello! I just got a PS3 and I had ike to use its wifi to connect to internet, I'm looking for a pair wireless modem with my modem cable, since I'm not currently wireless somehow. My problem is that my computer is a few years old and like all PC tend

  • Firewall: How can I SWITCH OFF THE FIREWALL on the PC

    How can I SWITCH OFF THE FIREWALL on the PC