简体   繁体   中英

Is this Valid Oracle Stored procedure

I have to call a stored procedure from oracle sever that not under our control so after digging i wrote a script in groovy to know the content of this procedure and it was like this

PROCEDURE SAM2_update_message_status (
      msg_id        IN   NUMBER,
      sam4_id       IN   NUMBER,
      msg_status    IN   NUMBER,
   smsc_answer   IN   VARCHAR2
   )
   IS
   BEGIN
   UPDATE TRC_MESSAGES_REMINDERS
   SET msg_status = msg_status
   WHERE MSG_ID = msg_id;
   COMMIT;

from my programing experience this is meaningless MSG_ID = msg_id,msg_status = msg_status but i don't know if it's the same in oracle.

I called it but no errors and the values i sent not reflected on the table.

Is this a Valid procedure?

Thanks

By the scope rules, it will use the column name before the parameter name, so that update isn't doing anything. I always stick "p_" before each parameter name to avoid conflicts like that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM