Oracle Database class notes (a)

Oracle Database class notes

sql plus command

l(ist)Browse buffer file
n xxreplace the buffer n-th row
nto set the current behavior of the n-th row
appendwill be something written on the current line at the end of
del nthe n-th row delete buffer
c(hange)modified when the line is something / xx (original) / xx (new)
savethe current buffer save the content area to the specified file (\ path \ path \ xx.xx)
getthe file into the buffer (\ path \ path \ xx.xx)
startto run the script (\ path \ path \ xx.xx)! ! No semicolon no effect
spool(\ path \ path \ xx.xx) will create a new file save screen stuff
spool offfrom the spool (\ path \ path \ xx.xx) Spool off things start to save (including itself)
show allto get all environment variables
show XXget XX Example: show user User is "SCOTT"
echo onrun the script show off what the script does not show
set feed(back)there will be feedback (default 6 lines) Example: 14 rows selected
set feedback offclose on open (by default)
set feedback 3set the query to the meaning of the three lines of information when there will be feedback
set hea(ding){on|off}title is displayed column (by default)
set array(size)to set the number of rows retrieved (default 20 lines)
set longis set to obtain the number of columns
set pagesizeto display a few lines of set number of pages in the
col(umn)[{column name | alias} [options]]
col ename for(mat) a5( the ename the column length is set to 5 (digital string aX X) exceeds the specified width wrap)
col sal for $999,999(provided that the sal format and with the addition of 999,999 dollar sign)
col sal heading '工资'(the head of the column name change sal as wages)
col salinquiry into what sal column settings
col sal clearThe format provided emptying col
col salSee sal all formats
col sal heading(format)XX format(heading)xx heading the format and mixing the same effect
select deptno || ‘,’ || dname || ‘,’ || loc from dept ;(the connecting column, separated)
select deptno , dname , loc from dept ;(in the form of three columns)

Released seven original articles · won praise 0 · Views 199

Guess you like

Origin blog.csdn.net/Vinseny/article/details/105179361