rem *********************************************************************
rem *                                                                   *
rem * Name     : sqlpluscondition.sql                                   *
rem * Synopsis : Shows an example of conditional logic in SQL*Plus      *
rem *            Please remember to customise the script before use.    *
rem * Source   : http://www.oracle-dba.fr.pl                            *
rem *                                                                   *
rem *********************************************************************

set verify off
accept continue char prompt 'Warning: About to remove rows from My_Table. Do you want to continue? (y|n) [n]: '

delete from My_Table
where  My_Column = 'condition'
and    upper('&continue') = 'Y';

commit;

