SQL*Plus® User's Guide and Reference Release 10.2 Part Number B14357-01 |
|
|
PDF · Mobi · ePub |
L[IST] [n | n m | n * | n LAST | * | * n | * LAST | LAST]
Lists one or more lines of the SQL buffer.
The buffer has no command history list and does not record SQL*Plus commands. In SQL*Plus command-line you can also use ";" to list all the lines in the SQL buffer.
Enter LIST with no clauses, or ";" to list all lines. The last line listed becomes the new current line (marked by an asterisk).
To list the contents of the buffer, enter
LIST
or enter
;
1 SELECT LAST_NAME, DEPARTMENT_ID, JOB_ID 2 FROM EMP_DETAILS_VIEW 3 WHERE JOB_ID = 'SH_CLERK' 4* ORDER BY DEPARTMENT_ID |
The asterisk indicates that line 4 is the current line.
To list the second line only, enter
LIST 2
The second line is displayed:
2* FROM EMP_DETAILS_VIEW |
To list from the current line (now line 2) to the last line, enter
LIST * LAST
You will then see this:
2 FROM EMP_DETAILS_VIEW 3 WHERE JOB_ID = 'SH_CLERK' 4* ORDER BY DEPARTMENT_ID |