Author: Awais Farooq

  • Comparison operators

    In Oracle, Comparison operators are used with the where clause. The following are the operators that can be used:- Comparison operator Description = Equal <> Not Equal != Not equal > Greater than >= Greater than or equal < Less than <= Less than or equal Table: Example: Equal operator In Oracle, equal (=) operator…

  • ORACLE BETWEEN

    In Oracle, BETWEEN is used to get the values from given range in select, insert, delete or update statement Syntax Parameters Expression: column name value1 and value2: values for range Table: Example 1 select id, name, age from table1 where age between 20 AND 28

  • ORACLE AND & OR

    In Oracle, AND & OR can be combined and used in select, insert, delete or update statement for checking two or more conditions. Syntax Parameters condition 1, condition 2,…., condition n: condition to match the records. Table: Example 1 select id, name, age from table1 where id>2 AND age<28 OR age>25

  • ORACLE AND

    In Oracle, AND is used in select, insert, delete or update statement for checking two or more conditions. Syntax Parameters condition 1, condition 2,……, condition n: condition to match the records. Table: Example 1 select id, name from table1 where name=’dolly’ AND age=18 Example 2 select id, name from table1 where name=’shristee’ AND id=1

  • ORACLE ALIASES

    In Oracle, aliasing can also be done in column name as well as in table name. Aliasing is done to give a temporary to a column or table. Syntax for column: Syntax for table: Parameters column_name: original name of the column table_name: original name of the table alias_name: temporary name Table: Example 1 select id, name as Student_name…

  • Oracle ENABLE Trigger

    The ALTER TRIGGER statement is used to enable a trigger. Syntax Parameters trigger_name: It specifies the name of the trigger that you want to enable. Oracle ENABLE Trigger Example This example will enable the trigger named “SUPPLIERS_T1” in the “SUPPLIERS” table. Oracle ENABLE ALL Triggers Example Syntax Example This example will enable all the triggers on…

  • Oracle DISABLE Trigger

    The ALTER TRIGGER statement is used to disable a trigger. Syntax Parameters trigger_name: It specifies the name of the trigger that you want to disable. Oracle DISABLE Trigger Example This example will disable the trigger called “SUPPLIERS_T2” from the table “SUPPLIERS”. Oracle DISABLE ALL Triggers Example If there is more than one trigger in a table…

  • Oracle DROP Trigger

    In Oracle, DROP TRIGGER statement is used to drop the trigger if you find that you need to remove it from the database. Syntax Parameters trigger_name: It specifies the name of the trigger that you want to drop. Oracle DROP Trigger Example It will drop the trigger name “SUPPLIERS_T1” from the table “SUPPLIERS”.

  • Oracle After INSERT/UPDATE/DELETE Trigger

    This statement specifies that Oracle will fire this trigger AFTER the INSERT/UPDATE or DELETE operation is executed. Syntax Parameters OR REPLACE: It is an optional parameter. It is used to re-create the trigger if it already exists. It facilitates you to change the trigger definition without using a DROP TRIGGER statement. trigger_name: It specifies the name of the trigger…

  • Oracle Before INSERT/UPDATE/DELETE Trigger

    This statement specifies that Oracle will fire this trigger BEFORE the INSERT/UPDATE or DELETE operation is executed. Syntax Parameters OR REPLACE: It is an optional parameter. It is used to re-create the trigger if it already exists. It facilitates you to change the trigger definition without using a DROP TRIGGER statement. trigger_name: It specifies the name of the trigger…