I have written my fair share of database scripts. Most of the time I write them in PL/SQL However for some quick and dirty scripts, I write plain SQL. This year I plan on generating a lot of test data. Perhaps I should consider SQL scripts for them. I am just now learning some of the options available to them.
When I write a script, I include comments at the top. Normally I start a comment line with the double dash. I have read and seen where you can use the REMARKS or just REM keyword to also start a comment. Multi line comments are between the /* and */ characters. Here is something I have not heard before. The last style comments (/* */) are the ones that are displayed on the screen when they are contained in a script that is run.
I know about using an ampersand in front of a variable to get the script to prompt the user for a value. However just recently I found out that those variables are always of type CHAR. If you use the ACCEPT command, the script will prompt the user but allow the programmer to specify the type of the variable holding the user input. Things like this are good to know. Time to get out there and write some scripts with this newly found knowledge.
Check Your Subroutines - We are delivering our latest release to internal test today. Had a code review yesterday. Many issues were found. We are fixing the highest priority probl...