110 likes | 335 Views
Oracle PL/SQL. SQL*Plus. EDIT. Opens notepad with the buffer contents To use type: Edit Ed. Edit commands. List / L1 change/old/new i order by field. SAVE. To save the buffer to file type Save <filename> Save d:a.sql create Save d:a.sql replace Save d:a.sql append
E N D
Oracle PL/SQL SQL*Plus
EDIT • Opens notepad with the buffer contents • To use type: • Edit • Ed
Edit commands • List / L1 • change/old/new • iorder by field
SAVE • To save the buffer to file type • Save <filename> • Save d:\a.sql create • Save d:\a.sql replace • Save d:\a.sql append • Also from the file menu
Get and Start • Get <filename> - to the buffer • Start <filename> - 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
CLEAR • 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}
Define • Select * from employee where job_id=669 • Define jid=669 • Select * from employee where job_id=‘&jid’ • Undefine jid • Accept jid669
More commands • Prompt text • variable fx number begin :fx :=669; end; • select * from employee where job_id=:fx; • Print fx