title: How to return newly inserted record column value
body: <p>I am new to <strong>Oracle</strong> SQL Developer. I am trying to write a SP to insert value,After insert record sp return correspondent talbe’s column= <strong>IN_ID</strong>(it’s <strong>primary key</strong>) value.My <strong>SP</strong> using the following query</p>
  
  <p><strong>Table</strong>:</p>
  
  <pre><code>CREATE TABLE SMS_IN
  (
    IN_ID      NUMBER(20)                         NOT NULL,
    MOBILE_NO  VARCHAR2(20 BYTE)                  NOT NULL,
    SMS_BODY   VARCHAR2(200 BYTE)                 NOT NULL,
    STATUS     NUMBER(1)                          NOT NULL,
    USERS      VARCHAR2(20 BYTE)                  NOT NULL,
    REMARKS    VARCHAR2(200 BYTE),
    IN_TIME    DATE                               NOT NULL
  )
  </code></pre>
  
  <p><strong>SP:</strong></p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE TST_SMS_IN
  (
  --P_MSISDN NUMBER,
  P_MOBILE_NO varchar2, 
  P_SMS_BODY VARCHAR2
  )
  IS
  
  V_SYSTEM_DATE DATE;
  V_YEAR NUMBER;
  V_YEAR_SYSTEM NUMBER;
  V_TABLE_NAME VARCHAR2(100) :='';
  V_SQL VARCHAR2(1000) :='';
  V_ERROR_MESSAGE VARCHAR2(1000) :='';
  
  P_AVG NUMBER;
  V_CREATED_BY NUMBER;
  
  BEGIN
       INSERT INTO SMS_IN(IN_ID,MOBILE_NO,SMS_BODY,STATUS,USERS,REMARKS,IN_TIME) VALUES
       (SMS_IN_SEQ.NEXTVAL,P_MOBILE_NO,P_SMS_BODY,0,'gp','TEST',sysdate);
       COMMIT;
  
  END TST_SMS_IN;
  </code></pre>
  
  <p>After insert help me to return newly inserted record column= IN_ID value.</p>
  
  <p>If have any query please ask.Thanks in advanced.</p>