To view all the settings, enter the following at the SQL prompt
SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 18 21:24:27 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: fhrd/fhrd@orcl
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SHOW ALL
appinfo is OFF and set to "SQL*Plus"
arraysize 15
autocommit OFF
autoprint OFF
autorecovery OFF
autotrace OFF
blockterminator "." (hex 2e)
btitle OFF and is the first few characters of the next SELECT statement
cmdsep OFF
colsep " "
compatibility version NATIVE
concat "." (hex 2e)
copycommit 0
COPYTYPECHECK is ON
define "&" (hex 26)
describe DEPTH 1 LINENUM OFF INDENT ON
echo OFF
editfile "afiedt.buf"
embedded OFF
escape OFF
escchar OFF
exitcommit ON
FEEDBACK ON for 6 or more rows
flagger OFF
flush ON
heading ON
headsep "|" (hex 7c)
instance "local"
linesize 80
lno 14
loboffset 1
logsource ""
long 80
longchunksize 80
markup HTML OFF HEAD "
newpage 1
null ""
numformat ""
numwidth 10
pagesize 14
PAUSE is OFF
pno 0
recsep WRAP
recsepchar " " (hex 20)
release 1102000100
repfooter OFF and is NULL
repheader OFF and is NULL
securedcol is OFF
serveroutput OFF
shiftinout INVISIBLE
showmode OFF
spool OFF
sqlblanklines OFF
sqlcase MIXED
sqlcode 0
sqlcontinue "> "
sqlnumber ON
sqlpluscompatibility 11.2.0
sqlprefix "#" (hex 23)
sqlprompt "SQL> "
sqlterminator ";" (hex 3b)
suffix "sql"
tab ON
termout ON
timing OFF
trimout ON
trimspool OFF
ttitle OFF and is the first few characters of the next SELECT statement
underline "-" (hex 2d)
USER is "FHRD"
verify ON
wrap : lines will be wrapped
errorlogging is OFF
SQL> SET PAGESIZE 200
SQL> SET LINESIZE 140
To enable output from PL/SQL blocks with
DBMS_OUTPUT.PUT_LIN
E, use the following:SQL> SET SERVEROUTPUT ON
Running Scripts From SQL Command Line
You can use a text editor to create SQL Command Line script files that contain SQL*Plus, SQL, and PL/SQL statements. For consistency, use the
.sql
extension for the script file name.A SQL script file is executed with a
START
or @
command. For example, in a Windows environment, you can execute a SQL script as follows:SQL> @c:\my_scripts\my_sql_script.sql
A SQL script file can be executed in a Linux environment as follows:
SQL> START /home/cjones/my_scripts/my_sql_script.sql
You can use
SET
ECHO
ON
to cause a script to echo each statement that is executed. You can use SET
TERMOUT
OFF
to prevent the script output from displaying on the screen.
When running a script, you need to include the full path name unless the script is located in the directory from which SQL Command Line was started, or the script is located in the default script location specified by the
SQLPATH
environment variable.SET MARKUP HTML PREFORMAT ON
SET COLSEP '|'
SELECT LAST_NAME, JOB_ID, DEPARTMENT_ID
FROM EMP_DETAILS_VIEW
WHERE DEPARTMENT_ID = 20;
LAST_NAME |JOB_ID |DEPARTMENT_ID
SET SERVEROUTPUT ON
SQL> COL PRODUCT FORMAT A35
|
No comments:
Post a Comment