Oracle Version : 10g As you know inside a Oracle row trigger you cannot access to the base table, for example when you make a trigger like this, on a table named “activity“. CREATE OR REPLACE TRIGGER UNAME.ACTIVITY_FK_MENU_INTEGRITY AFTER INSERT OR UPDATE ON UNAME.ACTIVITY REFERENCING NEW AS New OLD AS Old FOR EACH ROW DECLARE…
Leggi tutto
by using some simple view in Oracle you can extract a lot of information about your DB schema, some explicit samples : (assuming that MyDBOwner is the owner of the DB and ACTIVITY is a table of a schema, this sample is succesfully tested on Oracle 10g) — LIST OF USERS select OWNER,COUNT(DISTINCT TABLE_NAME) from…
Leggi tutto
I just starting on using Oracle 10g …. how to 1 : how retrive a guid from Oracle select sys_guid() from dual; how to 2 : how retrive next value from a Sequence select [your sequence name].nextval into from dual ; how to 3 : Oracle db Link , how to manage sql between multiple…
Leggi tutto
PLSQL is a world …. and Oracle an incredible RDBMS, so if you want to produce XML from query or manage XML inside your PLSQL Trigger or Procedure you can in different ways …. One of the most simple way is using the Oracle function to do that, like : SELECT sys_xmlgen(pk_id) from sellers; SELECT…
Leggi tutto
sometime happen that you need to create a table from a query… now we can assume that you have old_table and you wanna build a copi of entire data into another table new_table… This operation is not a standard sql but a lot DataBases can do this : in Oracle you can do this like…
Leggi tutto