Home| Progetto| Web| Faq| Acronimi | ||||
Argomenti Documenti pubblicabili:1120
Scripts:1282 Documenti non pubblicabili:162 Categorie tematiche:68 .Net |_C# |_Visual basic.net |_Asp.net Active Server Pages C++ Cascade Style Sheet JavaScript Mysql Php Xml Java |_Java 2 Micro Edition |_Java server pages |_Java Servlet Oracle |_PLSQL PostgreSQL Unix
PLSQL...
Info:
Exception
Oracle...
Script:
Esempio script dos per eseguire export di schema
Unix...
Tip:
Eseguire pił comandi in una sola linea
PLSQL...
Script:
FOR recordset IN (select statment) LOOP
PLSQL...
Tip:
Function
Shell scripting...
Script:
Script for archiving and compressing folder and file
A User Agent, like a web browser, uses HTTP to request a HTML document
Php Funzione mail()
In programming the danger of exploring the small details of coding is that you get obsessed with every line of code you write, thereby greatly reducing productivity.
In general, is not worth obsessing over code. On the other hand you should code with deliberation and intent. Steven Feurstein Oracle Magazine July /August 2004 A User Agent, like a web browser, uses HTTP to request a HTML document
|
PLSQL
Home >PLSQL > Trigger conditional code based on event type
In some scenario, within the same trigger you may need different logic depending the type of triggering event such insert or delete. Try always to keep trigger plsql code simple and short (about 60 lines maximum).
-- first create a sample table
SQL> create table t1 (n number, v varchar2(8), d date default sysdate);
SQL>
SQL> Trigger created.
CREATE OR REPLACE TRIGGER trg_test_t1 BEFORE DELETE OR UPDATE OR INSERT ON t1 FOR EACH ROW BEGIN IF INSERTING THEN dbms_output.put_line(' Hello insert ' || :new.v ); END IF; IF UPDATING THEN dbms_output.put_line(' Hello update ' || :new.v ); END IF; IF DELETING THEN dbms_output.put_line(' Hello delete ' || :old.v ); END IF; END; / Make sure the trigger is created and valid and then try it out: Let's tried
SQL> set serveroutput on
SQL> insert into t1(n,v) values (2,'a'); Hello insert a 1 row created. SQL> update t1 set v='b' ; Hello update b 1 row updated. SQL> delete t1 ; Hello delete b 1 row deleted. Warning: include(ads/text468x15.html): failed to open stream: No such file or directory in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Warning: include(): Failed opening 'ads/text468x15.html' for inclusion (include_path='.;C:\php\pear') in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Tutorial ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Script ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Comandi ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Codici errore ![]() ![]() ![]() ![]() ![]() |
Cerca
PLSQL...
Info:
Exception
Anger is creative, depression is useless.
Dyson, Freeman J. Anger is creative, depression is useless.
Dyson, Freeman J.
PLSQL...
Info:
Rapprensentare un apostrofo in sql e pl/sql
PLSQL...
Definizioni:
PL/SQL
Oracle...
Definizioni:
Schema and user
Shell scripting...
Script:
Shell script automating oracle data pump schema export
fishScript.Com is accessible by Mobile access technology
as mobile phones, Palm and Pocket PC .
Nicoleta e Marco Magnani tutorial, examples, courses, esempi, corsi, esercizi, appunti vari Dottoressa Nicoleta Dragu Formatrice Docente Insegnante Mediatrice Culturale Dott. Marco Magnani Universita La Sapienza Roma Master Computer Science Hunter College New York , Data Base Administrator DBA oracle System architect |