Oracle PL/SQL SQL*Plus
EDIT Opens notepad with the buffer contents To use type: –Edit –Ed Opens notepad with the buffer contents To use type: –Edit –Ed
Edit commands List / L1 change/old/new i order by field List / L1 change/old/new i order by field
SAVE To save the buffer to file type Save –Save d:\a.sql create –Save d:\a.sql replace –Save d:\a.sql append Also from the file menu To save the buffer to file type Save –Save d:\a.sql create –Save d:\a.sql replace –Save d:\a.sql append Also from the file menu
Get and Start Get - to the buffer Start - execute script Spool – from the file menu –Spools the screen to file –End by spool off command Get - to the buffer Start - execute script Spool – from the file menu –Spools the screen to file –End by spool off command
Output format select * from employee Column last_name heading lname Line break: –column last_name heading 'last | name‘ Width –Column first_name format a8 select * from employee Column last_name heading lname Line break: –column last_name heading 'last | name‘ Width –Column first_name format a8
CLEAR CLEAR COLUMNS (CL COL) CLEAR BUFFER (CL BUFF) CLEAR SCREEN (CL SCR) CLEAR COLUMNS (CL COL) CLEAR BUFFER (CL BUFF) CLEAR SCREEN (CL SCR)
SET COMMANDS SET PAU[SE] {ON | OFF} SET LIN[ESIZE] NUMBER SET HEA[DING] {ON | OFF} SET ECHO {ON | OFF} SET SERVEROUTPUT {ON | OFF} SET PAU[SE] {ON | OFF} SET LIN[ESIZE] NUMBER SET HEA[DING] {ON | OFF} SET ECHO {ON | OFF} SET SERVEROUTPUT {ON | OFF}
Define Select * from employee where job_id=669 Define jid=669 Select * from employee where job_id=‘&jid’ Undefine jid Accept jid 669 Select * from employee where job_id=669 Define jid=669 Select * from employee where job_id=‘&jid’ Undefine jid Accept jid 669
More commands Prompt text variable fx number begin :fx :=669; end; select * from employee where job_id=:fx; Print fx Prompt text variable fx number begin :fx :=669; end; select * from employee where job_id=:fx; Print fx