SQL * Plus command tip 1: SQL * Plus command to bind a variable to operate www.2cto.com SQL> var job varchar2 (20) SQL> exec: job: = 'sh _ cler' PL/SQL procedure successfully completed. SQL> select job_id, employee_id from emp where job_id =: job; SQL> print jobJOB 1_sh_clerk 2, displaying the size of the row and page variables www.2cto.com SQL> SHOW linesize pagesizelinesize 80 pagesize 143, set 80 characters for each line and 26 rows for each page> Set linesize 80 pagesize 26 4. When "&" is set, the "&" character is treated as a variable in the default SQL * Plus environment, in some cases, you also need to enter '& characters' under the SQL> symbol. You only need to change the SQL * Plus environment variable define. View the define status of the current SQL * Plus: SQL> SHOW define; the default & Variable binding function is canceled, and '& characters' can be treated as common characters. SQL> SET define off; Enable & bind the variable function, and use the string following & as a variable. SQL> SET define on; 5. SET the delimiter between columns SQL> show colsepcolsep "" SQL> select employee_id, job_id from emp where rownum <4; EMPLOYEE_ID JOB_ID ----------- -------- 198 SH_CLERK 199 SH_CLERK 200 AD_ASSTSQL> set colsep | SQL> show colsepcolsep "|" SQL> select employee_id, job_id from emp where rownum <4; EMPLOYEE_ID | JOB_ID ----------- | ---------- 198 | SH_CLERK 199 | SH_CLERK 200 | AD_ASST6, set whether to display the column title SQL> show headingheading ONSQL> set heading offSQL> select employee_id, job_id from emp where rownum <4; 198 | SH_CLERK 199 | SH_CLERK 200 | AD_ASSTSQL> set heading onSQL> select employee_id, job_id from emp where rownum <4; EMPLOYEE_ID | JOB_ID ----------- | ---------- 198 | SH_CLERK 199 | SH_CLERK 200 | AD_ASST www.2cto.com 7, set the system time to display SQL> set time on04: 17: 13. SQL> set timing on: displays the SQL statement execution time 8, save all set SQL environment variable values in a script file SQL> store set/home/oracle/myScripts/sqlset. sqlCreated file/home/oracle/myScripts/sqlset. sql9, Oracle FORMAT usage SQL> col job_id format a20SQL> col salary format syntax> select department_id, job_id, salary from emp where rownum <2; DEPARTMENT_ID JOB_ID SALARY limit ------------- 50 SH_CLERK 2600.00