Oracle insert/update/delete trigger

Dear all,

right now I am reading this

1) http://psoug.org/reference/table_trigger.html
2) http://www.techonthenet.com/oracle/triggers/after_insert.php
to see how to create table trigger for insert/update/delete data level audit.

how can I:
1) Create other table for audit purpose only for table A, name it as table A_audit, with additionaly fields and the rest of field just copy from table A ?
2) Create trigger (e.g.: insert audit) on table A so that any, insert action on table A, the change of data (what it is) will be record on table A_Audit ?  

for example only field B has been inserted with new value and what it is, how can I record it in A_Audit ?

3) how can I know if there are triggers define for table A already so that I can check if there are already trigger like this defined ? how to display it in Toad ?

4) how can I drop existing triggers in Toad ?

Question is :

5) If I point to database C and table A is inside database C, then if I create table A_Audit using Toad, it will store all data of A_Audit will store in the same space as database C?

6) When should I create tablespace? tablespace is just the storage of a table and nothing else?

7) Oracle can allow different table on different tablespace? or if table A and table B belongs to the same database/application, then we can easily scale out the loading of table to a lot of disk/storage ?

8) How can I check if table has enought space/how many space to expand for more data if I create the A_audit table?
LVL 1
marrowyungSenior Technical architecture (Data)Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ArgentiCommented:
A lot of questions!

1) see the CREATE TABLE statement
2) see the CREATE TRIGGER statement, then write inside the trigger's body the statement that writes data into your A_Audit table.
Attention: You will have to check all your fields for changes, as the trigger is triggered once for any change of any of your table fields. So you will need to test OLD and NEW values for every field.
3) here doc on how to test for triggers http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2107.htm#i1592586
4) use DROP trigger statement

You could use the ORACLE Doc for triggers also: http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/triggers.htm

5) Yes
6) ... (too complicated to explain in a single line). Short version: yes.
7) YES
8) ... http://www.techonthenet.com/oracle/tablespaces/index.php
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
@Argenti: these are quite sparse answers, you should be a little bit more elaborated ;-)

ad 1: you could create the audit tables based upon the "base" tables with e.g. 3 more columns like AUDIT_TIME, AUDIT_ACTION (I, U, D), AUDIT_USER (filled with app user or client info or whatever you need). Using DBA_... views you should be able to create scripts (procedures, functions, packages) that will (at least) generate the desired SQL statements or even "execute immediate" directly. If you need further help with that, I might give you some hints ;-)

ad 2: you can create 3 triggers (update, insert and delete) or just one compound trigger. and you will NOT have to check all the fields in all triggers. Usually you do this only in the update trigger. And I suggest you create row level triggers since you need ALL changed rows in your audit tables. Statement level triggers just fire once.

ad 3: see link from Argenti, e.g.:
select *
  from dba_triggers a
 where a.table_owner = your_schema
   and a.table_name = your_table;

select *
  from user_triggers a
 where a.table_owner = your_schema
   and a.table_name = your_table;

Open in new window


ad 4: usually this can be done with most of the (PL)SQL developer tools/IDEs (in Toad: select schema browser, navigate to the trigger of interest and right click on it, then "Drop trigger") --- or do it manually via drop trigger statement as mentioned above

ad 5: Regarding the database to which you are connected via Toad, then yes. But regarding the tablespaces used, then yes and no, since you can define the tablespace during the table creation and thus, this space does not have to be the same for base table and audits.

ad 6: no, tablespaces are also used by indexes.
Tablespaces are the bridge between certain physical and logical components of the Oracle database. Tablespaces are where you store Oracle database objects such as tables, indexes and rollback segments.
For some explanations see here:
http://www.dba-oracle.com/concepts/tablespaces_concepts.htm
http://www.beyondoracle.com/2008/07/09/oracle-tablespaces-explained/

ad 7: no objections

ad 8: for the size of tables and indexes you can use this:
select a.segment_name,
       a.segment_type,
       round(sum(a.bytes) / (1024 * 1024), 2) mb_used,
       round(sum(a.bytes) / (1024 * 1024 * 1000), 2) gb_used
  from user_extents a
 where a.segment_name like upper('%your_table_or_index%')
 group by a.segment_name,
          a.segment_type
 order by decode(a.segment_type, 'INDEX', 'X', 'TABLE', 'A', 'B'),
          substr(a.segment_name, 4, 7);

Open in new window


for free tablespace you can try this:
select tablespace_name,
       round(sum(free_bytes) / (1024 * 1024), 0) free_mb,
       round(sum(free_bytes) / (1024 * 1024 * 1000), 2) free_gb
  from (select a.tablespace_name,
               sum(a.bytes) free_bytes
          from user_free_space a
         group by a.tablespace_name
        union
        select b.tablespace_name,
               b.bytes_free free_bytes
          from v$temp_space_header b)
 group by tablespace_name
 order by tablespace_name;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
marrowyungSenior Technical architecture (Data)Author Commented:
Alex140181,

"@Argenti: these are quite sparse answers, you should be a little bit more elaborated ;-)"

very excellent, you are right.

"Using DBA_... views you should be able to create scripts (procedures, functions, packages) that will (at least) generate the desired SQL statements or even "execute immediate" directly. If you need further help with that, I might give you some hints ;-)"

yes, I need, how to generate the new table from Toad?  give me some example please so that I can change it myself.  I tried to right click the talbe from Toad and I can't generate a script for the table for me to recreate that.

In MysQL, I will just create table like <source table>

"you can create 3 triggers (update, insert and delete) or just one compound trigger. and you will NOT have to check all the fields in all triggers"

yes, I knew, before delete, after insert, before and after update, right? usually we might not need before update.

what is "check all fields in all triggers"?  any example?

"And I suggest you create row level triggers since you need ALL changed rows in your audit tables. Statement level triggers just fire once.
"
there are cell level triggers you mean ? I just want to audit/log down the data value that has change and what it is.

"ad 4: usually this can be done with most of the (PL)SQL developer tools/IDEs (in Toad: select schema browser, navigate to the trigger of interest and right click on it, then "Drop trigger") --- or do it manually via drop trigger statement as mentioned above"

is this what you mean :

the trigger
"ad 5: Regarding the database to which you are connected via Toad, then yes. But regarding the tablespaces used, then yes and no, since you can define the tablespace during the table creation and thus, this space does not have to be the same for base table and audits."

what is the purpose of not using the space of tablespace on store the table on that database? I heard that Oracle do not have database by only table and schema, why ?

"Tablespaces are the bridge between certain physical and logical components of the Oracle database. Tablespaces are where you store Oracle database objects such as tables, indexes and rollback segments"

 a bit hard to understand, so this mean tablespace is a logic item, but underlaying is the physically storage to store all table, data of table and index of that table?

please show me some example of creating:
1) After insert triggers of table A and insert that record to table A_audit.
2) Before and after update triggers for that.
3) before delete trigger for that.

this is quicker for me to learn.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

ArgentiCommented:
"@Argenti: these are quite sparse answers, you should be a little bit more elaborated ;-)"

very excellent, you are right.
@marrowyoung, you said
right now I am reading this ... table_trigger.php... after_insert.php...
So I supposed you took the things in the right order and you already know how to work with tables (create, alter, drop etc.). That's why I pointed you to the CREATE statement doc.
Creating another table with the same structure as a model table (plus some fields) means just to copy-paste the DDL of the original table, make the necessary changes and execute it. Please leave the triggers for a while and try learning about tables first. Oracle is NOT MySQL! (even if they belong to the same company).

"Tablespaces are the bridge between certain physical and logical components of the Oracle database. [...]"

 a bit hard to understand
I agree! That's why I didn't want to discuss it in details. Please start learning the basics (tables, views, stored procedures, triggers etc.)

P.S. I'm not a Toad fan. So I cannot send you screen captures nor precise indications for that matter.
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
P.S. I'm not a Toad fan. So I cannot send you screen captures nor precise indications for that matter.
Me neither ;-)

Actually Argenti is right: you'll have to learn the basics first.

Moreover, I suggest you code the triggers manually (or with the help of TOAD) rather than using PL/SQL to generate or auto-create these (this could be your next step once you become familiar with the basics).

But, I will give you 3 examples of the triggers, so you'll have a starting point of how this could look like / could be done:

1. BEFORE INSERT EACH ROW:
create or replace trigger YOUR_TABLE_BIER
  before insert on YOUR_TABLE
  referencing new as new old as old
  for each row
begin
  insert into YOUR_TABLE_AU
    (AUDIT_STAMP,
     AUDIT_USER,
     AUDIT_ACTN,
     ID_COL,
     DATA_COL1,
     DATA_COL2)
  values
    (sysdate,
     :new.userid,
     'I',
     :new.ID_COL,
     :new.DATA_COL1,
     :new.DATA_COL2);
end;

Open in new window


2. BEFORE UPDATE EACH ROW:
create or replace trigger YOUR_TABLE_BUER
  before update on YOUR_TABLE
  referencing new as new old as old
  for each row
begin
  if (:old.DATA_COL1 <> :new.DATA_COL1) or (:old.DATA_COL2 <> :new.DATA_COL2) then
    insert into YOUR_TABLE_AU
      (AUDIT_STAMP,
       AUDIT_USER,
       AUDIT_ACTN,
       ID_COL,
       DATA_COL1,
       DATA_COL2)
    values
      (sysdate,
       :new.userid,
       'U',
       :new.ID_COL,
       :new.DATA_COL1,
       :new.DATA_COL2);
  end if;
end;

Open in new window


3. BEFORE DELETE EACH ROW:
create or replace trigger YOUR_TABLE_BDER
  before delete on YOUR_TABLE
  referencing new as new old as old
  for each row
begin
  insert into YOUR_TABLE_AU
    (AUDIT_STAMP,
     AUDIT_USER,
     AUDIT_ACTN,
     ID_COL,
     DATA_COL1,
     DATA_COL2)
  values
    (sysdate,
     :old.userid,
     'D',
     :old.ID_COL,
     :old.DATA_COL1,
     :old.DATA_COL2);
end;

Open in new window

0
marrowyungSenior Technical architecture (Data)Author Commented:
Argenti,

"Creating another table with the same structure as a model table (plus some fields) means just to copy-paste the DDL of the original table, make the necessary changes and execute it. "

Yes, you are right and that's why I said who to GENERATE the script from Toad, then I add some more field on it. but as I am new to Oralce (even I have a concept the the component already) I need some scripting help,

the tast I am going to do now is all script based, which not involving any UI operation at all when executing it. this data level audit is the same as MS SQL and MySQL.

"I agree! That's why I didn't want to discuss it in details. Please start learning the basics (tables, views, stored procedures, triggers etc.)"

yeah, I understand. That's why I come here and ask instead of reading a lot of not-true material and get you expert suggest.

Alex140181,

you are god helpful, but could you please give me example of AFTER insert as before insert should means nothing, or I change the script to:

create or replace trigger YOUR_TABLE_BIER
  AFTER insert on <YOUR_TABLE>
  referencing new as new old as old
  for each row
begin
  insert into YOUR_TABLE_AU
    (AUDIT_STAMP,
     AUDIT_USER,
     AUDIT_ACTN,
     ID_COL,
     DATA_COL1,
     DATA_COL2)
  values
    (sysdate,
     :new.userid,
     'I',
     :new.ID_COL,
     :new.DATA_COL1,
     :new.DATA_COL2);
end;

Open in new window


?

in the auit table, waht should be the field type/schema of ":

1 ) AUDIT_STAMP,
   2) AUDIT_USER,
   3)  AUDIT_ACTN ?

please give me an example, which you already done (I guess)

So the AFTER update trigger is :

create or replace trigger YOUR_TABLE_BUER
  AFTER update on YOUR_TABLE
  referencing new as new old as old
  for each row
begin
  if (:old.DATA_COL1 <> :new.DATA_COL1) or (:old.DATA_COL2 <> :new.DATA_COL2) then
    insert into YOUR_TABLE_AU
      (AUDIT_STAMP,
       AUDIT_USER,
       AUDIT_ACTN,
       ID_COL,
       DATA_COL1,
       DATA_COL2)
    values
      (sysdate,
       :new.userid,
       'U',
       :new.ID_COL,
       :new.DATA_COL1,
       :new.DATA_COL2);
  end if;
end;

Open in new window

0
marrowyungSenior Technical architecture (Data)Author Commented:
Alex140181,

Thanks again for your support, I am thinking if that script can be improve so that it only log down changed cell instead of the whole role , in which, any cell don't chagne still log in the audit table with the same vaule.

can we do in  this way ?
0
marrowyungSenior Technical architecture (Data)Author Commented:
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
as before insert should means nothing
What does that mean?!? This is simply NOT true. As always: it depends... But you may choose whatever suites your needs.

in the auit table, waht should be the field type/schema of
If you mean datatype:
AUDIT_STAMP = TIMESTAMP(6)
AUDIT_USER = VARCHAR2(100) -> your app user or client info or whatever you "have"
AUDIT_ACTN = VARCHAR2(1) -> "I"nsert, "U"pdate, "D"elete

that it only log down changed cell instead
Sure, this is also possible. BUT you will generate a lot more audit data (rows) that way....
0
marrowyungSenior Technical architecture (Data)Author Commented:
"
What does that mean?!? This is simply NOT true. As always: it depends... But you may choose whatever suites your needs."

from some developer's point of view, it is true.

One IT Manager from developement tell me this as he said he done this kind of project before.
I understand his concept that what is the status of before insert, insert is a new field and BEFORE that should be nothing there. So only after insert does matter...

the update one is also true that the after update of previous udpate should be the before update vaule of this time, so no need to keep the same thing twice. agree?


"AUDIT_STAMP = TIMESTAMP(6)
AUDIT_USER = VARCHAR2(100) -> your app user or client info or whatever you "have"
AUDIT_ACTN = VARCHAR2(1) -> "I"nsert, "U"pdate, "D"elete"

yes, so how can I declare it? let see one of the example of the existing table:

source table :

CREATE TABLE ADMGCSA.AFR_BILLFLWUP
(
  BILL_YEAR       NUMBER(4)                     NOT NULL,
  BILL_MONTH      NUMBER(2)                     NOT NULL,
  SECUSER_ID      VARCHAR2(25 BYTE)             NOT NULL,
  BFLWUP_DATE     DATE                          NOT NULL,
  BFLWUP_COMMENT  VARCHAR2(2048 BYTE)           NOT NULL
)
TABLESPACE GCSA_DENVER
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCOMPRESS 
NOCACHE
NOPARALLEL
MONITORING;

Open in new window


then I change it to:

CREATE TABLE ADMGCSA.AFR_BILLFLWUP
(
AUDIT_STAMP TIMESTAMP(6)  NOT NULL,
AUDIT_USER  VARCHAR2(100)  NOT NULL,
AUDIT_ACTN   VARCHAR2(6)    NOT NULL,    -- (Insert/update/delete)
  BILL_YEAR       NUMBER(4)                     NOT NULL,
  BILL_MONTH      NUMBER(2)                     NOT NULL,
  SECUSER_ID      VARCHAR2(25 BYTE)             NOT NULL,
  BFLWUP_DATE     DATE                          NOT NULL,
  BFLWUP_COMMENT  VARCHAR2(2048 BYTE)           NOT NULL
)
TABLESPACE GCSA_DENVER
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCOMPRESS 
NOCACHE
NOPARALLEL
MONITORING;

Open in new window


?

"Sure, this is also possible. BUT you will generate a lot more audit data (rows) that way.... "

on that rows should be ok as all data insert in a row not a column, right?

how can we modify the script you provide to me that for the data cell/field don't have any change, the audit record should show NULL for the data cell so we can quickly know which field has been change and which doesn't ?
0
marrowyungSenior Technical architecture (Data)Author Commented:
also if I want to log down:

1) The application that writes that and
2) Which host the insert/update/delete

what should I add in the _audit table?


also in the trigger, how can I assign the value to:

1) AUDIT_STAMP
2) AUDIT_USER  
3) AUDIT_ACTN
4) application that send that query
5) the host that run that application

?
0
marrowyungSenior Technical architecture (Data)Author Commented:
also, anyway to store the SQL statement for each audit log row to undo the data change ?
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
from some developer's point of view, it is true.

One IT Manager from developement tell me this

ROFL!! Sorry for that, but if you believe in everything your IT Manager tells you, you're doomed ;-)
There is no general "take only the after ins/upd/del trigger"! But anyways...

1. If you want the non-changed column values of the audit tables to be NULL then you'll have to compare each field and set its value according to the condition (this can also be generated)... -> wheras this would only make sense within the update-trigger...
But the question is WHY?! IMHO this is absolutely not neccessary!

2.
1) The application that writes that and
2) Which host the insert/update/delete

what should I add in the _audit table?


also in the trigger, how can I assign the value to:

1) AUDIT_STAMP
2) AUDIT_USER  
3) AUDIT_ACTN
4) application that send that query
5) the host that run that application

You might want to take advantage of the SYS_CONTEXT function to get those information, as shown here (or in the official docs):
http://psoug.org/reference/sys_context.html

To assign values within the triggers, i.e. (depends on how your insert will look like):
:old.AUDIT_STAMP := sysdate;
:new.AUDIT_ACTN := 'I';

insert into your_audit_table
(AUDIT_STAMP, AUDIT_ACTN, ....)
values(sysdate, 'D', ...);

also, anyway to store the SQL statement for each audit log row to undo the data change ?
Sorry, but this is some kind of "silly" question since you're already about to store the old/changed values in your audit tables so that you can restore this state... There is really no need to store the changing statement ;-)

Apart from all that, I truly have the feeling (considering what and how you ask), that you definitely should take (at least) one basic course of the basic concepts (also mentioned above)...
0
marrowyungSenior Technical architecture (Data)Author Commented:
0
marrowyungSenior Technical architecture (Data)Author Commented:
"

You might want to take advantage of the SYS_CONTEXT function to get those information, as shown here (or in the official docs):
http://psoug.org/reference/sys_context.html"

SELECT user#
FROM sys.user$
WHERE name = USER;?

then I do

set AUDIT_USER  = (SELECT user#
FROM sys.user$
WHERE name = USER;)

?

":old.AUDIT_STAMP := sysdate;
:new.AUDIT_ACTN := 'I';"

there is an colon in the beginning of each line?

"Sorry, but this is some kind of "silly" question since you're already about to store the old/changed values in your audit tables so that you can restore this state... There is really no need to store the changing statement ;-)"

The FGA article I shared indicated that it can hanlde this kidn of thing, seems automatically, I didn't hear that before and I am not sure how to implement this.

from my point of view this is not silly, but quit powerful.

"Apart from all that, I truly have the feeling (considering what and how you ask), that you definitely should take (at least) one basic course of the basic concepts (also mentioned above)... "

yeah, I booked a course and paid for that.. but doing the audit task now is the first pripority, that' s why I ask.

you can simple show me that.
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
you can simple show me that.

I have already done this! But I will NOT give you a completely coded & tested solution. IMHO, you have to learn by yourself. Me and most other EEs here act more like guides...

You somehow want to drive a F1 racing car, but in fact, you don't have a driver's licence yet ;-)

Maybe some other expert is willing to "guide" you on this...

Kind regards,
Alex
0
ArgentiCommented:
You somehow want to drive a F1 racing car, but in fact, you don't have a driver's licence yet ;-)
=)) I couldn't have said that better!

Me and most other EEs here act more like guides...
That is something EE should put on its first page, in uppercase bold!
0
marrowyungSenior Technical architecture (Data)Author Commented:
"I have already done this! But I will NOT give you a completely coded & tested solution. IMHO, you have to learn by yourself. Me and most other EEs here act more like guides..."

excellent and that's what is the course for.

we paid and let's get something back.

"Maybe some other expert is willing to "guide" you on this..."

I appreciate all of your help and you are helpful anyway. you are more than a guide alreayd. your script and the MySQL script for the same thing,  is 90% silimiar. I have alredy done that and that one work for MySQL.

Argenti,

How are you ...
0
ArgentiCommented:
marrowyung,

Seriously now, I'm afraid that you (and so many others) have misunderstood the role of Experts Exchange.

I would advise you to read How EE works, or even EE Terms of use, but it would be a lot to read, so I will give you a short resumé:
- Experts Exchange is a place to exchange solutions to different problems on the technological domain
- EE is usually a secondary source of answers you should use after searching the dedicated documentation for the field addressed by your technology issue/question.
- EE works as a knowledge-base of already answered questions, and you can search for your answers among all these solutions. (You can also use some other sources to search for similar issues - Google, for example)
- in case you couldn't find your answers, you might ask your specific question(s) by posting a message on the EE website (I don't exactly know how much someone has to pay for it, but there is a reasonable fee)
- EE experts might answer your question(s) either by giving you hints that could be able to help you, either by sending you specific examples.

Now, for your specific case, this is what I have noticed:
- you came with a LOT of questions (initially posted more that 8! I personally find a little bit "overwhelming" for a single post)
- some of your questions were very general ("When should I create tablespace?")
- you initially stated that you already know how to work with databases, that you are reading about tables and triggers, but in the meantime you asked specific questions about how to create a table and a trigger, what exactly to put inside your trigger's body etc. That gives me the impression that either you didn't read the documentation, either you read id, but you didn't understand it.
You just want to work on a higher level, higher than your knowledge is. That's why we both advised you to start learning the basics, then to try to evolve to more complex things.

We are not here to do anybody's homeworks.

I'm sorry for your frustration if you are a paid member, but you cannot expect somebody to do your work.

Sincerely,
Argenti

P.S. We don't get paid a dime for our time involved in answering all these questions! This is volunteer work for us.
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
Amen ;-)
0
marrowyungSenior Technical architecture (Data)Author Commented:
Argenti,

First of all, what you are showing me is what Alex140181 provide is not good ! he is good and he is the one you should learn from.

but usually, from time to time, I can see some one like you. but it will be just one....

"Experts Exchange is a place to exchange solutions to different problems on the technological domain
- EE is usually a secondary source of answers you should use after searching the dedicated documentation for the field addressed by your technology issue/question.
- EE works as a knowledge-base of already answered questions, and you can search for your answers among all these solutions. (You can also use some other sources to search for similar issues - Google, for example)
- in case you couldn't find your answers, you might ask your specific question(s) by posting a message on the EE website (I don't exactly know how much someone has to pay for it, but there is a reasonable fee)
- EE experts might answer your question(s) either by giving you hints that could be able to help you, either by sending you specific examples.
:"

Where you found this out?

I am geting much Serious than you... but I do not care about that.

"- you came with a LOT of questions (initially posted more that 8! I personally find a little bit "overwhelming" for a single post)"

I asked the administrator of EE, they said no rules on controlling how they ask question, but I really break my quesion into 4 questions. I already get good feedback from other members.

"- some of your questions were very general ("When should I create tablespace?")"

then what ? seems can't ask at all!! first time I hear someone said this BS to me. I don't come to EE to ask question and what should I do ? pay you for a tea break ?

"you initially stated that you already know how to work with databases, that you are reading about tables and triggers, but in the meantime you asked specific questions about how to create a table and a trigger, what exactly to put inside your trigger's body etc. That gives me the impression that either you didn't read the documentation, either you read id, but you didn't understand it. "

Again, it seems I can't ask the question in the way I want, I have to follow your rules?

but what is "read id" ??? very hard to understand and I am not sure if EE or members here always type this kind of thing.. I don't complian, someone might have some difficulty on this. but I suggest we RESPECT everyone here.

"We are not here to do anybody's homeworks."

do you think I use anyone's script here can do the homeworks ??? very interesting... never experience this before and never done that.

Their scritp can be a good start point on learning thing....

what Alex140181 is very good already and I learn a lot of from him, and other one....

That's why I said MysQL and Oracle here, for this part, looks very close. but I don't ask you all MySQL at all, it is all my call.

"I'm sorry for your frustration if you are a paid member, but you cannot expect somebody to do your work."

yes, I am a paid memeber.. we offends no one here... except..


"P.S. We don't get paid a dime for our time involved in answering all these questions! This is volunteer work for us. "

I would suggest you just ignore anything you don't like to see here. you voluntee here do'nt mean you has to spend so much time to type this.














Alex140181,

Yeah, I have links to read for that, but it is a long way to go from the ground, ground. come here have someone guide that is also a learning.
0
ArgentiCommented:
marrowyung

First of all, what you are showing me is what Alex140181 provide is not good ! he is good and he is the one you should learn from.
Whaaat?? Where did you take this one from? I never said that.

Again, it seems I can't ask the question in the way I want, I have to follow your rules?
No, you don't have to follow any rules (btw, which is actually exactly you are doing).
I think asking ALL those questions at once is something about "common sense" (which is not that common actually...)

I don't come to EE to ask question and what should I do ? pay you for a tea break ?
Oh God, no! Sorry, but I'll have to remind you what I just said: We are volunteers here! We don't get paid a dime for our time spent. And I'll add some more: I don't need you to pay me anything here, thank you.

but what is "read id" ??? very hard to understand and I am not sure if EE or members here always type this kind of thing...
=)) I said "That gives me the impression that either you didn't read the documentation, either you read id, but you didn't understand it. " 
"read it" - here as simple past tense simple, the verb "read" is an irregular verb, having the same form in infinitive, simple past and past participle http://www.englishpage.com/irregularverbs/irregularverbs.html.
Let me draw you a picture, so you can understand better:
I supposed (and still do) one of the following things (exclusive OR, radio-buttons group):
options
yes, I am a paid memeber.. we offends no one here... except..
Except...??

I would suggest you just ignore anything you don't like to see here.
That's a very good piece of advice! You should follow it yourself too! :)

you voluntee here do'nt mean you has to spend so much time to type this.
Typing in here doesn't take me a lot of time. I'm quite confident with my English, even if I'm not a native English speaker.

I have links to read for that, but it is a long way to go from the ground, ground. come here have someone guide that is also a learning.
Remember the radio-buttons I draw you earlier? I frankly suppose the checked option is (1). Why? I don't know. Laziness maybe??
0
marrowyungSenior Technical architecture (Data)Author Commented:
"And I'll add some more: I don't need you to pay me anything here, thank you.
"

thank you, you got it now ...

"That's a very good piece of advice! You should follow it yourself too! :)"

from now on, it is waste of time, because this kind of thing waste of time but learn nothing.

however, one thing, you are much better than the one who challenge me in MS SQL side, but he is the only ONE there who do this.

you are much BETTER .... I can see it based on your reply  this time.

"Typing in here doesn't take me a lot of time. I'm quite confident with my English, even if I'm not a native English speaker."

I am not sure if you have a lot of time on ths.. I  do not have a lot of thing to doing this kind of thing.

"Remember the radio-buttons I draw you earlier? I frankly suppose the checked option is (1). Why? I don't know. Laziness maybe?? "

my answer is none of the above, you forget to give me option 3.

I read part of it and the rest later. I get a lot of post from the rest of contributor, I appreciate that.

"No, you don't have to follow any rules (btw, which is actually exactly you are doing).
I think asking ALL those questions at once is something about "common sense" (which is not that common actually...)"

......................................, then can't see why you post that much for me to follow...

Usually I would say "Yes Sir", then do my other works....

then tea break.,,,, hahaha
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
I totally agree with Argenti! But we're getting way off topic.  I suggest you close this subject before anyone gets hurt ;-)
0
marrowyungSenior Technical architecture (Data)Author Commented:
no one get hurts.... me?? no.....

thanks for your agreeement. sometime the forum is better.... no one will say this.

This topic has been closed however, you got the point I gave you, you own that.. you helped me.
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
Thank you. I hope it helps solving your problem.

Kind regards
Alex
0
marrowyungSenior Technical architecture (Data)Author Commented:
I accidently watch this from EE site:

<iframe src="//player.vimeo.com/video/23174586" width="500" height="281" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

what mark wills said is people come here for a solution, not an answer.

might be he is wrong....... other members in the video said, people come here probably because they dig into a big problem and looking for a solution, people here helps.

That's why I interested on EE, but from time to time, they are looks too good for someone, but as they probably the SELECTED people so they presented positively.

I gave a lot of high score to one of the presenter over there.

if you check my ansewr to some of the post, I give them my experience and the STEPS to verify that one by one without any links.....  

Some time links can kill hurt people as finally we found out this is not what we are loooking for , then we go for something else , forum?? probably EE?? nononooo.
0
marrowyungSenior Technical architecture (Data)Author Commented:
"
I gave a lot of high score to one of the presenter over there."

Forgot to tell you all that this user give us an essay of the whole theory, one by one, without any URL...

as we found out that we can't find that out from google..

That author/EE helpers know he is not a router, re-route something from the google !
0
marrowyungSenior Technical architecture (Data)Author Commented:
I see 2 more video from EE.

What?? ask my own question to solve my own problem instead of google it ???? is it possible ??

might be this is the reason they come here....
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.