title: How to manipulate "if condition" in ORACLE SQL PROCEDURE?
body: <p>I am using ORACLE 10g &amp; PHP codeigniter for my application.
  I have a procedure defined like this:-</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE 
          insertMovie (id IN NUMBER, title IN VARCHAR2, 
              sdate IN DATE, edate IN DATE,
                          image IN VARCHAR2, add_date IN DATE,
              message OUT NUMBER) 
      AS
          BEGIN
              INSERT INTO tbl_movie (movie_id, movie_title, movie_sdate, movie_edate, movie_image, movie_add_date) 
              VALUES ( id, 'title', to_date('sdate', 'yyyy-mm-dd hh24:mi:ss'), to_date('edate', 'yyyy-mm-dd hh24:mi:ss'), 'movie_image', to_date('add_date', 'yyyy-mm-dd hh24:mi:ss'));
              message:= 1;
          END;
  /
  </code></pre>
  
  <p>Now, I want a if condition to return either 1 or 0. If insert will be successful, message will be 1. If insert fails. message will be 0.</p>
  
  <p>How can I do that?</p>