Oracle – PL-SQL – Trigger – After Insert OR Update OR Delete

We can create a trigger with multiple actions (i.e.  Insert or Update or Delete) here sharing an example of trigger in which we can handle three actions as insert, update and delete. Example: CREATE OR REPLACE TRIGGER EMPLOYEE_AI_AU_AD AFTER INSERT OR UPDATE OR DELETE ON EMPLOYEE FOR EACH ROW DECLARE

» Read more

Oracle – Introduction to Databases, tablespaces, and datafiles

Databases, tablespaces, and datafiles are closely related, but they have important differences. It is important to know the differences for Newbie that‘s why sharing here. Databases:  An Oracle database consists of one or more logical storage units called tablespaces that collectively store all of the database data. Tablespace: Each tablespace

» Read more

Oracle – How to copy a table

— CREATE TABLE CREATE TABLE EMPLOYEE ( ID NUMBER NOT NULL, FIRST_NAME VARCHAR2(10 BYTE), LAST_NAME VARCHAR2(10 BYTE) ); — INSERT SOME VALUES INTO TABLES INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (1,'VARINDER','SANDHU'); INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (2,'DINESH','SHARMA'); INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (3,'RANJOYT','SINGH'); INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (4,'VIKRAM','SINGH'); — CREATE

» Read more

Oracle – PL-SQL – ORA-04091: table name is mutating, trigger/function may not see it

Error: ORA-04091: table name is mutating, trigger/function may not see it Cause: Mutating trigger error occurs when a trigger references the table that owns the trigger. So the result is we receive the above error message. Solution: We cannot refer the table in the trigger that owns the trigger. If

» Read more
1 9 10 11 12 13 27