Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Revise and Re-Run the Last SQL Command
How To Revise and Re-Run the Last SQL Command? - Oracle DBA FAQ - Introduction to Command-Line SQL*Plus Client Tool
✍: FYIcenter.com
If executed a long SQL statement, found a mistake in the statement, and you don't want enter that long statement again, you can use the input buffer commands to the correct last statement and re-run it. The following tutorial exercise gives you a good example:
SQL> connect HR/retneciyf
SQL> SELECT FIRST_NAME, LAST_NAME, HIRE_DATE
2 FROM EMPLOYEE WHERE FIRST_NAME LIKE 'Joh%';
FROM EMPLOYEE WHERE FIRST_NAME LIKE 'Joh%'
*
ERROR at line 2:
ORA-00942: table or view does not exist
SQL> LIST
1 SELECT FIRST_NAME, LAST_NAME, HIRE_DATE
2* FROM EMPLOYEES WHERE FIRST_NAME LIKE 'Joh%'
SQL> CHANGE /EMPLOYEE/EMPLOYEES/
2* FROM EMPLOYEES WHERE FIRST_NAME LIKE 'Joh%'
SQL> RUN
(Query output)
SQL> INPUT ORDER BY FIRE_DATE
SQL> LIST
1 SELECT FIRST_NAME, LAST_NAME, HIRE_DATE
2 FROM EMPLOYEE WHERE FIRST_NAME LIKE 'Joh%'
3* ORDER BY HIRE_DATE
SQL> RUN
(Query output)
SQL> CLEAR BUFFER
buffer cleared
SQL> LIST
SP2-0223: No lines in SQL buffer.
2007-04-29, 4874👍, 0💬
Popular Posts:
Which is the best place to store ConnectionString in Dot Net Projects? I am about to deploy my first...
What are the high-level thread states? The high-level thread states are ready, running, waiting, and...
How To Enter Numeric Values as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to...
How to create arrays in JavaScript? We can declare an array like this var scripts = new Array(); We ...
How Do You Uninstall JUnit Uninstalling JUnit is easy. Just remember these: Delete the directory tha...