Sql*Plus User’s Guide and Reference
Download 5.34 Mb. Pdf ko'rish
|
E18404-12
- Bu sahifa navigatsiya:
- Placing Comments in Scripts
- Using the REMARK Command
- Using /*...*/
5-7
Deleting Lines Use the DEL command to delete lines in the buffer. Enter DEL specifying the line numbers you want to delete. Suppose you want to delete the current line to the last line inclusive. Use the DEL command as shown. DEL * LAST DEL makes the following line of the buffer (if any) the current line. See DEL on page 12-48 for more information. Placing Comments in Scripts You can enter comments in a script in three ways: ■ using the SQL*Plus REMARK command for single line comments. ■ using the SQL comment delimiters /*... */ for single or multi line comments. ■ using ANSI/ISO (American National Standards Institute/International Standards Organization) comments -- for single line comments. Comments entered at the command-line are not stored in the SQL buffer. Using the REMARK Command Use the REMARK command on a line by itself in a script, followed by comments on the same line. To continue the comments on additional lines, enter additional REMARK commands. Do not place a REMARK command between different lines of a single SQL command. REMARK Commission Report; REMARK to be run monthly.; COLUMN LAST_NAME HEADING 'LAST_NAME'; COLUMN SALARY HEADING 'MONTHLY SALARY' FORMAT $99,999; COLUMN COMMISSION_PCT HEADING 'COMMISSION %' FORMAT 90.90; REMARK Includes only salesmen; SELECT LAST_NAME, SALARY, COMMISSION_PCT FROM EMP_DETAILS_VIEW WHERE JOB_ID='SA_MAN'; Using /*...*/ Enter the SQL comment delimiters, /*...*/, on separate lines in your script, on the same line as a SQL command, or on a line in a PL/SQL block. You must enter a space after the slash-asterisk(/*) beginning a comment. The comments can span multiple lines, but cannot be nested within one another: /* Commission Report to be run monthly. */ COLUMN LAST_NAME HEADING 'LAST_NAME'; COLUMN SALARY HEADING 'MONTHLY SALARY' FORMAT $99,999; COLUMN COMMISSION_PCT HEADING 'COMMISSION %' FORMAT 90.90; REMARK Includes only salesmen; SELECT LAST_NAME, SALARY, COMMISSION_PCT FROM EMP_DETAILS_VIEW /* Include only salesmen.*/ WHERE JOB_ID='SA_MAN'; |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling