Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL History Command

Status
Not open for further replies.

vtsao

IS-IT--Management
Jul 29, 2003
6
US
Is there a history command just like in UNIX on SQL?
 
VTSao,

Unfortunately, in SQL*Plus, the history has a very short memory: 1 SQL command. At the SQL> prompt, hit the letter 'L'<enter> to see the 1 SQL command in history. You may then edit that 1 SQL command with these SQL*Plus commands:

<n><space><string> (adds/replaces line <n> with <string>)

<n> (moves buffer pointer to line <n> for following commands)

C<delimiter><old_string><delimiter><new_string><delimiter> (the final delimiter is optional unless the final character of <new_string> is a hyphen (-) or a blank space.

A<blank><string to append to end of line>

del<enter> (delete current buffer line)

del <starting_line_number><space><ending_line_number> (deletes buffer lines from
<starting_line_number> thru <ending_line_number>)

Cheers,

Dave
Sandy, Utah, USA @ 16:30 (20Nov03) GMT, 09:30 (20Nov03) Mountain Time
 
It depend on environment where sql*plus is used. Command prompt Windows version allows retreiving lines (though not commands) entered earlier within the same sql*plus session.
If you need command history, use sql*worksheet instead.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top