I have some SQL scripts for Oracle and I wonder to know exactly what is the objective of the following line:
REM INSERTING into TABLE_NAME
After this line I get the inserts for the table.
Insert into TABLE_NAME (ID,ENUM_KEY,NAME,DESCRIPTION) values (3,3,'T_EXIT_POINT','T_EXIT_POINT'); Insert into TABLE_NAME (ID,ENUM_KEY,NAME,DESCRIPTION) values (4,4,'T_CONDITION','T_CONDITION');
Anyone can explain me this REM INSERTING
, or where to find documentation about it?
REM[ARK] Begins a comment in a script. SQL*Plus does not interpret the comment as a command. Usage. The REMARK command must appear at the beginning of a line, and the comment ends at the end of the line.
Is the command, which may be abbreviated SET DEF. OFF. Disables variable substitution. ON. Enables variable substitution, and resets the substitution prefix character back to the default ampersand (&) character.
"set define off" is a sql*plus command. You should call it before calling the stored procedure, not within the procedure. Show the details, How the procedure looks like, How you are calling the procedure and from where (which client), and what is the exact problem you are facing.
If there are any, the client will stop and ask you to supply a value for the variable. At which point it'll change your code to include this text. So unless you know your script includes these variables, it's best to set define off. This avoids unexpected changes to your data & code!
REM, or short for REMARK, is used in SQL*Plus to indicate the beginning of a comment in a SQL script. Read more about REM in the documentation here.
Instead of
REM INSERTING into TABLE_NAME
I suggest you use PROMPT
PROMPT INSERTING into TABLE_NAME
That way the script output would contain the string "INSERTING into TABLE_NAME".
More about PROMPT here. It's especially useful when you have ECHO OFF.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With