Create a timestamp trigger.

could someone help me with the following table?

I am creating a timestamp column to store the datetime value, when the line was created.

When I test with an insert, it gave me an error.

How to fix this timestamp column?

create the table jobHistory
(
createTS timestamp
, Procedurename varchar2 (100)
, varchar2 (100) description
)
;


create or replace trigger ins_jobHistory_timestamp
before inserting
on .jobHistory
for each line
Start
: new.createTS: = sysdate;
end;


insert into jobHistory (procedurename, Start_Or_End, description) values ('Hello,' of ', "testsing");

INS_JOBHISTORY_TIMESTAMP update TRIGGER
Errors: Newspaper the compiler check

No need to create a trigger

SQL> create table jobHistory
  2  (
  3  createTS timestamp default sysdate
  4  , ProcedureName varchar2(100)
  5  , description varchar2(100)
  6  )
  7  ;

Table created.

SQL> insert into jobHistory (ProcedureName,description) values ('Abcd','Xyz');

1 row created.

SQL> select * from jobHistory;

CREATETS
---------------------------------------------------------------------------
PROCEDURENAME
--------------------------------------------------------------------------------
DESCRIPTION
--------------------------------------------------------------------------------
28-MAY-10 07.27.40.000000 PM
Abcd
Xyz

However if you want to achieve with trigger then omit the default clause and

SQL> create or replace trigger ins_jobHistory_timestamp
  2  before insert
  3  on jobHistory
  4  for each row
  5  begin
  6  :new.createTS := sysdate;
  7  end;
  8  /

Trigger created.

SQL> insert into jobHistory (ProcedureName,description) values ('ADS','FDR');

1 row created.

SQL> select * from jobHistory;

CREATETS
---------------------------------------------------------------------------
PROCEDURENAME
--------------------------------------------------------------------------------
DESCRIPTION
--------------------------------------------------------------------------------
28-MAY-10 07.27.40.000000 PM
Abcd
Xyz

28-MAY-10 07.29.58.000000 PM
ADS
FDR

Published by: Johan on May 28, 2010 06:59

Tags: Database

Similar Questions

  • How to create iMessage timestamps

    How can I create a timestamp in iMessage settings so I get info date and time of each text message I get. I have Android and it's automatic. It of not a big deal, but may be useful in trying to remember when you sent or received a message. Here is an example

    iMessages already are time stamped, but hidden by default. To see the time stamp, open any conversation, slide your finger on the message from right to left. However, once your finger is raised, the timestamp will disappear.

  • Create custom timestamp

    Hello
     
    I work on an electricity network and have need to analyze the current and voltage values and display some graphics (power, RMs values).
    I have acquire voltage and current signals with the acquisition of data that works perfectly and save the data in a PDM file. This file is read later in another application that contains all the analyses of power using the Suite of electric power of Labview.

    I can trace all my outings with the date and the time at which the data were acquired (from the file time stamp) but the power on the output of 'power values VI', the values are shown without date or time and it is very important for me to trace the values of power at the right date Ant time.

    I thought to create a timestamp that is initialized with the value of the PDM file first. At each iteration of the loop for, I would add 0.2 second (each iteration corresponds to 10 cycles of the voltage and current signals = 0.2 second for a grid of 50 Hz, it also corresponds to the frequency at which 'power values VI' calculates the values of power) and transmit the data with records to offset.

    My question: is it possible? How can I do? (I don't know how to add time to a timestamp) and is there a better way to do this?

    I tried an answer for a long time! any help would be much appreciated.
     
    (My main VI is very ugly, I know, I just started making it and test things.)

    The easiest way would be to use time of wave table get.  Which returns an array of timestamps corresponding to your samples in your waveform were taken.

  • creating an oracle trigger

    I am trying to create a trigger.got a few questions

    It's like

       CREATE or REPLACE TRIGGER  productTrig
    AFTER
    UPDATE OR INSERT ON product
    REFERENCING NEW
    AS NEW
    FOR EACH ROW
    BEGIN

      
    INSERT INTO h_product
      
    (
      H_PRODUCT_ID
    ,
      PRODUCT_ID 
      
    )
      
    VALUES
      
    (
      seq_h_product
    .nextval,
      
    :new.product_id
      
    );

    END



    error code - ORA-04098:

    I am getting error that trigger is invalid.


    What's wrong

    change a bit and try now

    ProductTrig CREATE or REPLACE TRIGGER

    AFTER UPDATE OR INSERT is produced

    REFERRING AGAIN LIKE NEW

    FOR EACH LINE

    BEGIN

    INSERT INTO h_product

    (

    H_PRODUCT_ID,

    PRODUCT_ID

    )

    VALUES

    (

    seq_h_product.nextval,

    : new.product_id

    );

    END;

    /

  • How to create several timestamps fileds in EDS data object?

    Hi all


    I am creating BAM BOF EDS data objects. I have provided information for the connections of the DB, during the recording of the data objects its not allowing the fields of timestamps.
    is there a workaround solution and please let me know the possibilities.

    Thank you.
    Swamy

    Hello

    Here is the SNA for this oracle docs question.from
    Note:

    Only the tables owned by the user are displayed when a data object is created on an EDS.

    Creating a data object with multiple fields of time on an EDS stamp is not supported.

    http://docs.Oracle.com/CD/E15586_01/integration.1111/e10224/bam_data_objects.htm#BABCEHBB

    http://docs.Oracle.com/CD/E15586_01/integration.1111/e10224/bam_extl_data_sources.htm

    Thank you
    Siva

  • How to create the update trigger

    Hi all

    I want to create the trigger
    After the update of the

    How can I create

    I want to update my custom table "xx-per_all_vacancies.

    This trigger should be executed when
    table of hr_api_transaction update

    Hello

    It will not work

    >
    Select transaction_id INTO update_trans_id from hr_api_transactions where: NEW. LAST_UPDATE_DATE DISLIKES: NEW. CREATION_DATE;
    xx_GL_Vacancies.update_transaction (update_trans_id);

    >

    Implement

       select transaction_id INTO update_trans_id from hr_api_transactions where LAST_UPDATE_DATE NOT LIKE :NEW.CREATION_DATE;
       xx_GL_Vacancies.update_transaction(update_trans_id);
    

    This might give you an error of mutation.

    see you soon

    VT

  • Is it possible to create a timestamp Date using a plug-in?

    I created a plug-in that converts PDF files into TIFF files.

    Is there a way to promote a TIFF file as it is created with a date/time stamp?

    I thought that it's basically the equivalent of creating a stamp or a comment to TIFF because it is generated or in the PDF file just before to be converted?

    Thank you

    You can put an annotation you want...

  • Create a timestamp with current_timestamp but keeping the seconds as 00

    Hello world

    I was wondering if there is a way more easy/better to use the current_timestamp as my timestamp base and display a different timestamp at the present time, the seconds as 00. For example, 04:30. Below works but I think it's too complex.

    CAST ('timestamp' |) ' ' || Tank (39) | TRIM (CAST (YEAR (CURRENT_DATE) AS FLOAT)) | '-' ||
    BOX WHEN MONTH (CURRENT_DATE) = '1' THEN '01'
    WHEN MONTH (CURRENT_DATE) = '2' THEN '02'
    WHEN MONTH (CURRENT_DATE) = '3' THEN ' 03 "
    WHEN MONTH (CURRENT_DATE) = '4' AND ' 04 "
    WHEN MONTH (CURRENT_DATE) = '5' AND ' 05 "
    WHEN MONTH (CURRENT_DATE) = '6' AND '06'
    WHEN MONTH (CURRENT_DATE) = '7' AND '07'
    WHEN MONTH (CURRENT_DATE) = '8' THEN '08'
    WHEN MONTH (CURRENT_DATE) = '9' THEN '09'
    END OF ANOTHER CAST (MONTH (CURRENT_DATE) AS CHAR) | '-' ||
    BOX WHEN DAYOFMONTH (CURRENT_DATE) = '1' THEN '01'
    WHEN DAYOFMONTH (CURRENT_DATE) = '2' THEN '02'
    WHEN DAYOFMONTH (CURRENT_DATE) = '3' THEN ' 03 "
    WHEN DAYOFMONTH (CURRENT_DATE) = '4' AND ' 04 "
    WHEN DAYOFMONTH (CURRENT_DATE) = '5' AND ' 05 "
    WHEN DAYOFMONTH (CURRENT_DATE) = '6' AND '06'
    WHEN DAYOFMONTH (CURRENT_DATE) = '7' AND '07'
    WHEN DAYOFMONTH (CURRENT_DATE) = '8' THEN '08'
    WHEN DAYOFMONTH (CURRENT_DATE) = '9' THEN '09'
    END OF ANOTHER CAST (DAYOFMONTH (CURRENT_DATE) AS CHAR) | ' ' ||
    TRIM (BOX WHEN HOUR (CURRENT_TIMESTAMP) = ' 1 'THEN ' 01'
    WHEN HOUR (CURRENT_TIMESTAMP) = '2' THEN '02'
    WHEN HOUR (CURRENT_TIMESTAMP) = '3' THEN ' 03 "
    WHEN (CURRENT_TIMESTAMP) HOUR = '4' AND ' 04 "
    WHEN (CURRENT_TIMESTAMP) HOUR = '5' AND ' 05 "
    WHEN (CURRENT_TIMESTAMP) HOUR = '6' AND '06'
    WHEN (CURRENT_TIMESTAMP) HOUR = '7' AND '07'
    WHEN (CURRENT_TIMESTAMP) HOUR = '8' THEN '08'
    WHEN (CURRENT_TIMESTAMP) HOUR = '9' THEN '09'
    ANOTHER (HOUR (CURRENT_TIMESTAMP) AS CHAR) CAST END) | ':' ||
    TRIM (BOX WHEN MINUTE (CURRENT_TIMESTAMP) = ' 1 'THEN ' 01'
    WHEN MINUTE (CURRENT_TIMESTAMP) = '2' THEN '02'
    WHEN MINUTE (CURRENT_TIMESTAMP) = '3' THEN ' 03 "
    WHEN MINUTE (CURRENT_TIMESTAMP) = '4' AND THEN ' 04 "
    WHEN MINUTE (CURRENT_TIMESTAMP) = '5' THEN ' 05 "
    WHEN MINUTE (CURRENT_TIMESTAMP) = '6' AND THEN '06'
    WHEN MINUTE (CURRENT_TIMESTAMP) = '7' AND THEN '07'
    WHEN MINUTE (CURRENT_TIMESTAMP) = '8' THEN '08'
    WHEN MINUTE (CURRENT_TIMESTAMP) = '9' THEN '09'
    OTHER CAST (MINUTE (CURRENT_TIMESTAMP) AS CHAR) END) | ' : 00' ||
    Tank (39) AS TIMESTAMP)

    Thanks in advance for your comments

    Published by: user10930658 on March 25, 2009 14:05

    TIMESTAMPADD (SQL_TSI_SECOND,-second (current_timestamp), current_timestamp)

  • Trigger created with errors

    Hi all

    I created a new trigger but there are compilation errors, I get the error that says command not properly ended SQL when look up into a toad. Can you please indicate what the problem is in my syntax below.

    In addition, Inorder for me to restore the relaxation I just created what I drop this trigger and run create or replace the trigger statement or the create statement or replace will replace the previous trigger that I created.

    Thank you!


    create or replace TRIGGER Abcd.lddp_tup
    BEFORE the UPDATE IT lddp FOR EACH ROW
    declare timenow TIMESTAMP;
    Start
    SELECT INTO timenow DUAL FROM CURRENT_TIMESTAMP
    : new.create_sid: =: old.create_sid;
    : new.create_date: =: old.create_date;
    : new.saved_date: = timenow;
    : new.par_num: =: old.par_num;
    : new.af_id: =: old.af_id;
    IF
    : new.locked_bemsid IS NOT NULL AND: old.locked_sid IS NULL
    THEN
    : new.locked_date: = timenow;
    ON THE OTHER
    : new.locked_sid: =: old.locked_sid;
    : new.locked_date: =: old.locked_date;
    END IF;
    end;
    /

    >
    I created a new trigger but there are compilation errors, I get the error that says command not properly ended SQL when look up into a toad. Can you please indicate what the problem is in my syntax below.
    >
    You must add a semicolon (';') at the end of this line

    SELECT CURRENT_TIMESTAMP INTO timenow FROM DUAL     <-- put a semicolon at the end
    

    As to this
    >
    In addition, Inorder for me to restore the relaxation I just created what I drop this trigger and run create or replace the trigger statement or the create statement or replace will replace the previous trigger that I created.
    >
    You don't need to give up to relax. CREATE or REPLACE will replace the previous trigger that you created.

  • What is this error when creating a trigger

    Hello

    I have create a trigger and get the following error. What is - c

    1 CREATE OR REPLACE TRIGGER TRG_AUDIT_LOGON AFTER
    2 LOG ON TO THE DATABASE
    3 Declare
    4 v_sid v$session.sid%type;
    type of v_serial 5 v$ session.serial # %;
    v_username 6 v$session.username%type;
    v_osuserid 7 v$session.osuser%type;
    8 v_machinename v$session.machine%type.
    v_PROGRAM 9 v$session.program%type;
    v_TERMINAL 10 v$session.terminal%type;
    11 v_hostname v$instance.host_name%type;
    v_instance_name 12 v$instance.instance_name%type;
    13 v_application_id v$database.dbid%type;
    date of v_logon_time 14;
    15 v_Audit_tab_check varchar2 (30);
    16 v_system_users_tab_check varchar2 (30);
    17 v_sql_Audit_upload varchar2 (1000): = "INSERT INTO dbaoper. T_AUDIT (HOST_NAME, APPLICATION_ID, INSTANCE_NAME, SID, SERIAL #, username, OSUSERID, MACHINENAME, PROGRAM, TERMINAL, LOGON_TIME) VALUES (: v_hostname,: v_application_id,: v_instance_name,: v_sid,: v_serial,: v_username,: v_osuserid,: v_machinename,: v_program,: v_TERMINAL,: v_logon_time) ';
    18 type c_audit_cur_typ is ref cursor;
    19 C_Audit c_audit_cur_typ;
    20 V_system_users_tab: = "T_SYSTEM_USERS";
    21 No_Audit_records Exception;
    Begin 22
    23 select table_name in v_Audit_tab_check from dba_tables where owner = 'DBAOPER' and table_name = "T_AUDIT";
    24 select table_name in v_system_users_tab_check from dba_tables where owner = 'DBAOPER' and table_name = "T_SYSTEM_USERS";
    25 c_Audit open for ' SELECT sid, serial # username, osuser, machine, terminal program v $ session WHERE audsid = userenv ("' sessionid" ') and program not as "'oracle@%J0%"' and no user name (select * from dbaoper.' |) V_system_users_tab |') and type! = "' BACKGROUND"' ';
    26 c_Audit of fetch in v_sid, v_serial, v_username, v_osuserid, v_machinename, v_program, v_TERMINAL;
    27 if c_Audit % Notfound then
    28 lift No_Audit_records;
    Else 29
    30 select host_name, instance_name in v_hostname, v_instance_name from v$ instance;
    31 select dbid from v_application_id from v$ database;
    32 select sysdate in double v_logon_time;
    33 execute immediate v_sql_Audit_upload using v_hostname, v_application_id, v_instance_name, v_sid, v_serial, v_username, v_osuserid, v_machinename, v_program, v_TERMINAL, v_logon_time;
    34 end if;
    35 close C_Audit;
    exception of 36
    37 when no_data_found then
    38 dbms_system.ksdwrt (2, 'ORA-20001 Audit T_AUDIT or T_SYSTEM_USERS not found Audit information tables are not entered'
    (39);
    40 what then No_Audit_records
    41 dbms_output.put_line ('Audit number to insert records");
    42 * end;
    SQL > /.

    WARNING: Trigger created with compilation errors.

    SQL > sho err
    Errors for TRG_AUDIT_LOGON TRIGGER:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    18/20 PLS-00103: encountered the symbol "=" when expecting one of the
    Next:
    constant exception < an ID >
    < a between double quote delimited identifiers > double Ref table Fedya
    char time timestamp interval date binary national character
    NCHAR
    The '< an identifier >' replaced with '=' to
    continue.


    Thank you
    Pramod

    replace * "' * with *" *. For example userenv ("' sessionid" ') to userenv ("sessionid")

  • Trigger - use one to create primary key values

    I'm stuck on a simple use to do a TRIGGER that fires when you add new rows to a table and want to Developer SQL to add the primary key value.

    I seem to be able to relax, but it is not inserted the primary key but giving a SQL error: ORA-00947: not enough values.

    Here's what I have.

    CREATE TABLE HF_fishers

    (

    contact_id INT NOT NULL

    , name VARCHAR (25)

    , last_name VARCHAR (35)

    PRIMARY KEY (contact_id)

    );

    CREATE SEQUENCES HF_fishers_seq.

    Then I ran the following trigger:

    CREATE

    HF_fishers_seq_trigger RELAXATION

    BEFORE INSERTING

    ON HF_fishers

    FOR EACH LINE

    BEGIN

    IF (: new.contact_id IS NULL)

    THEN

    : NEW.contact_id: = NVL (: NEW.contact_id)

    HF_fishers_seq. NEXTVAL

    );

    END IF;

    END HF_fishers_seq_trigger;

    =============

    Then I executed the following SQL statement that gives the error.

    INSERT INTO HF_fishers VALUES('Jacob','Muller');

    But if I do everything is good except that it defeats the purpose of relaxation.

    INSERT INTO HF_fishers VALUES(1,'Jacob','Muller');

    MySQL has a nice 'AUTO_INCREMENT' command, but from what I understand in Oracle, I need to set up a trigger to automatically increment a column/cell, which in this case I use for the PRIMARY KEY.

    3003916 wrote:

    OK Jaramillo, I tried as you wrote, but what would be an INSERT statement correct?

    -After the code trigger of Jaramillo

    INSERT INTO HF_fishers (first_name, last_name) values ("Jesse", "Owens"); -I have the trigger but he made the mistake of duplicate key.

    INSERT INTO HF_fishers values (hf_fishers_seq.nextval, 'Jesse', "Owens");  -No trigger but get key duplicated,.

    INSERT INTO HF_fishers VALUES(:NEW_contact_id,'Jesse','Ownes'); -works without the trigger but the "get links" dialog box appears. So not much 'automatic' on this issue,.

    My mistake.  Here is the modified version of the trigger. I removed the CONDITIONAL clause and comes to be a part of the body of the trigger.

    So, I created the table, the sequence, the relaxation and ran the first two insert statements and it worked fine.  The third one you have invites SQL + or any tool you use to enter a value if she sees the ":" colon as a variable binding.  Colon only works in a trigger without asking for confirmation.

    Here is the code and my exit I ran home

    DROP TABLE hf_fishers CASCADE CONSTRAINTS PURGE;
    DROP SEQUENCE hf_fishers_seq;
    
    CREATE TABLE hf_fishers
    (
    contact_id   INTEGER NOT NULL
    ,first_name   VARCHAR(25)
    ,last_name    VARCHAR(35)
    ,PRIMARY KEY (contact_id)
    );
    
    CREATE SEQUENCE hf_fishers_seq;
    
    CREATE OR REPLACE TRIGGER hf_fishers_seq_trigger
       BEFORE INSERT
       ON hf_fishers
       FOR EACH ROW
    BEGIN
    
       IF(:NEW.contact_id IS NULL) THEN
          :NEW.contact_id := hf_fishers_seq.NEXTVAL;
       END IF;
    
    END hf_fishers_seq_trigger;
    
    INSERT INTO hf_fishers(first_name, last_name)
         VALUES ('Jesse', 'Owens');  -- Works with the trigger
    
    INSERT INTO hf_fishers
         VALUES (hf_fishers_seq.nextval, 'Jesse', 'Owens');  --Works without using the trigger body code.
    
    SELECT *
      FROM hf_fishers;
    
    COMMIT;
    

    The output

    Deleted table.

    Elapsed time: 00:00:00.05

    Sequence has fallen.

    Elapsed time: 00:00:00.02

    Table created.

    Elapsed time: 00:00:00.03

    Order of creation.

    Elapsed time: 00:00:00.02

    Trigger created.

    Elapsed time: 00:00:01.05

    1 line of creation.

    Elapsed time: 00:00:00.04

    1 line of creation.

    Elapsed time: 00:00:00.01

    CONTACT_ID FIRST NAME LAST NAME

    ---------- ------------------------- -----------------------------------

    1 Jesse Owens

    2 Jesse Owens

    2 selected lines.

    Elapsed time: 00:00:00.04

    Validation complete.

    Elapsed time: 00:00:00.01

  • Create a trigger that send mail with attachment after insertion of a line in Oracle APEX

    I want to create an insert after trigger on a table that is to send a mail with an attachment. Here is my code.

    CREATE OR REPLACE TRIGGER tr_feedback

    AFTER INSERT on REVIEWS

    FOR EACH LINE

    DECLARE

    l_id NUMBER;

    BEGIN

    l_id: = APEX_MAIL. SEND)

                    p_to        => ' [email protected] ',

    P_FROM = >: NEW. E-mail

    p_subj = >: NEW. Object

    p_body = > "Please see the attachment."

    p_body_html = > ' review of < b > please < /b > the attachment ")

    APEX_MAIL. ADD_ATTACHMENT (p_mail_id = > l_id,)

    p_attachment = >: NEW. FILE,

    p_filename = >: NEW. FILE NAME,

    p_mime_type = >: NEW. MIME);

    END;

    But when I insert data, I get the following error:

    ORA-20022: Null value provided for the parameter p_filename.

    ORA-06512: at "APEX_040200.WWV_FLOW_MAIL", line 1070

    ORA-06512: at "APEX_040200.WWV_FLOW_MAIL_API", line 141

    ORA-06512: at "TR_FEEDBACK", line 11

    ORA-04088: error during execution of trigger 'TR_FEEDBACK '.

    Now, how can I fix that? Thanks in advance.

    Agree with the above.  Triggers (ab) should not be used in this way.  Nontransactional process should not be based on a transactional trigger.  These processes are part of the business logic and should be at the level of the company of codification (Summit, you can add a process to be executed once the completed insertion)

  • Trying to create a trigger that adds a value to a field based on another field

    Hello

    Im trying to set a trigger that will add a field to a table if another field = the same thing and one where the condition is met, but can't seem to get anything to do and can't find anything online suggesting the syntax.

    the use of im tables are

    Applications_History

    Students

    I need the trigger to identify if the 'status' field = applicant accepted when a new data column is added, if that is the case I need to identify the scope of student_number of applications_history and match it to the student_number on students field, I then need to add a 'Y' in the field 'put' corresponding to this student in the student table. I'm looking for without stopping for some type of syntax format online but could not find anything, is it still possible?

    Thank you

    Something like that?

    create or replace trigger aiur_applications_history

    after insert or update on applications_history

    for each line

    Start

    If nvl (: old.application_status, 'x'). = 'candidate admitted '.

    and: new.application_status = 'candidate admitted '.

    then

    students update

    the value = 'y '.

    where student_number =: new.student_number;

    end if;

    end;

    /

    Kind regards

    Zlatko

  • Create materialized view at the trigger.

    Hello

    I use version below:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    I created a materialized view query below:

    CREATE THE FSG1_FUND000 MATERIALIZED VIEW

    PCTUSED, PCTFREE 5 70

    Users TABLESPACE

    STORAGE (INITIAL 500K NEXT 500K)

    Refresh a start fast with (sysdate) next (sysdate + (1 / 1440))

    WITH rowid

    AS

    SELECT * FROM ABNDEV_T24. FSG1_FUND000@abndev;

    This Mview if any insert or update only (WITHOUT DELETING) are coming which should be copy to another table. But in mView trigger does not work.

    So pls advice me no alternative.

    Querys trigger:

    create or replace trigger trg_dummy

    after insert or update on FSG1_FUND000

    for each line

    Start

    If the insertion

    insert into FSG1_FUND001 (RECID, XMLRECORD) values (: new.) RECID,: new. XMLRECORD);

    elsif update then

    insert into FSG1_FUND001 (RECID, XMLRECORD) values (: new.) RECID,: new. XMLRECORD);

    end if;

    end;

    /

    Kind regards

    Villa

    Hello

    I learned and referred website as much as we can not able to create a trigger in MView (sorry we create trigger but none use of creation because in view no insert and update happened). So I drop completely the materialized view concepts and relaxation.

    Instead of, I have using the procedure to insert records in a table and then I created one by dbms_scheduler job.

    This discussion will be useful for any future reference.

    -procedure-

    create or replace procedure p2

    as

    Start

    INSERT / * + APPEND * / INTO FSG1_FUND000 SELECT * FROM FSG1_FUND000@remote;

    End; BluShadow

    /

    -----------------job--------------------

    Begin

    DBMS_SCHEDULER. () CREATE_JOB

    job_name-online "JOB4."

    job_type-online "PLSQL_BLOCK."

    JOB_ACTION => ' BEGIN p2; END;',

    start_date => SYSDATE,

    repeat_interval => ' FREQ = MINUTELY; INTERVAL = 5;',

    End_date => NULL,

    -Online TRUE, enabled

    comments => "Inserting a record in a table");

    end;

    /

  • How trigger if and object of the database will be created?

    Hi, how to write and trigger if any database object will be created? Concerning

    You can create a DDL trigger

    CREATE OR REPLACE TRIGGER trigger_name
      AFTER CREATE ON SCHEMA
    BEGIN
      <>
    END;
    

    Justin

Maybe you are looking for