home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 27.ddi / admin / help / plushelp.ctl < prev   
Encoding:
Text File  |  1991-03-04  |  399.0 KB  |  15,102 lines

  1. load data
  2. infile *
  3. concatenate 2
  4. into table help replace
  5. fields
  6. (
  7.   seq    char (3) terminated by ',',
  8.   topic  char (30) terminated by ',',
  9.   info   position (*) char (80)
  10. )
  11. BEGINDATA
  12.   1,/,
  13.  
  14.   2,/,
  15.  
  16.   3,/,
  17.                                 / (slash)
  18.   4,/,
  19.  
  20.   5,/,
  21.  /
  22.   6,/,
  23.  
  24.   7,/,
  25.  Enter a slash (/) at the command prompt or at a line number prompt to
  26.   8,/,
  27.  execute a SQL command or PL/SQL block in the SQL buffer.  The slash
  28.   9,/,
  29.  command works like RUN, but does not list the command on your screen
  30.  10,/,
  31.  buffer.
  32.  11,/,
  33.  
  34.  12,/,
  35.  Executing a SQL command or PL/SQL block with the slash does not change the
  36.  13,/,
  37.  current line number in the SQL buffer unless the command in the buffer has
  38.  14,/,
  39.  an error.  If so, SQL*Plus makes the line with the error the current line.
  40.  15,/,
  41.  
  42.  16,/,
  43.  Examples: Type LIST to see the contents of the buffer:
  44.  17,/,
  45.  
  46.  18,/,
  47.                SQL> LIST
  48.  19,/,
  49.                  1* SELECT ENAME, JOB FROM EMP WHERE ENAME = 'JAMES'
  50.  20,/,
  51.  
  52.  21,/,
  53.            Enter / (slash) to execute the command in the buffer:
  54.  22,/,
  55.  
  56.  23,/,
  57.                SQL> /         Output:  ENAME   JOB
  58.  24,/,
  59.                                        ------  -----
  60.  25,/,
  61.                                        JAMES   CLERK
  62.  26,/,
  63.  
  64.  27,/,
  65.  See also: @, edit, get, list, run, save, parameters, set (SQL buffer),
  66.  28,/,
  67.            spool, start, commands, menu.
  68.   1,1 Row Char Functions,
  69.  
  70.   2,1 Row Char Functions,
  71.  
  72.   3,1 Row Char Functions,
  73.                            1 Row Char Functions
  74.   4,1 Row Char Functions,
  75.  
  76.   5,1 Row Char Functions,
  77.  ASCII(string)     Returns collating sequence value of 1st char of string.
  78.   6,1 Row Char Functions,
  79.  CHR(n)            Returns character having ASCII or EBCDIC value of n.
  80.   7,1 Row Char Functions,
  81.  INITCAP(char)     Capitalizes each word's first letter, others lowercase.
  82.   8,1 Row Char Functions,
  83.  INSTR(char1,      Beginning at position m, returns the position of the
  84.   9,1 Row Char Functions,
  85.    char2, m, n)       nth occurrence of char2 in char1; m & n = 0 if absent.
  86.  10,1 Row Char Functions,
  87.  LENGTH(char)      Returns the length of char.
  88.  11,1 Row Char Functions,
  89.  LOWER(char)       Returns char in lowercase.
  90.  12,1 Row Char Functions,
  91.  LPAD(char1,       Adds char2 n number of times in front of char1.
  92.  13,1 Row Char Functions,
  93.    n, char2)
  94.  14,1 Row Char Functions,
  95.  LTRIM(char, s)    Removes beginning characters from char, up to the first
  96.  15,1 Row Char Functions,
  97.                       character not in the s set; s = ''if absent.
  98.  16,1 Row Char Functions,
  99.  NLSSORT(char)     Gives char's National Language collating sequence.
  100.  17,1 Row Char Functions,
  101.  REPLACE(char,     Changes each find in char to new; omit new to erase
  102.  18,1 Row Char Functions,
  103.    find, new)         find.  Use TRANSLATE for single characters.
  104.  19,1 Row Char Functions,
  105.  RPAD(char1, n,    Adds char2 n number of times after char1.
  106.  20,1 Row Char Functions,
  107.    char2)
  108.  21,1 Row Char Functions,
  109.  RTRIM(char, set)  Removes characters from the end of char until the
  110.  22,1 Row Char Functions,
  111.                       first character not in set; set = ''if absent.
  112.  23,1 Row Char Functions,
  113.  SOUNDEX(char)     Returns string phonetically equivalent to char.
  114.  24,1 Row Char Functions,
  115.  SUBSTR(char,      Returns n characters in char, starting at char c.
  116.  25,1 Row Char Functions,
  117.    c, n)
  118.  26,1 Row Char Functions,
  119.  TRANSLATE(char,   Returns char with each find changed to new.
  120.  27,1 Row Char Functions,
  121.    find, new)
  122.  28,1 Row Char Functions,
  123.  UPPER(char)       Returns char in UPPERCASE.
  124.  29,1 Row Char Functions,
  125.  
  126.  30,1 Row Char Functions,
  127.  
  128.  31,1 Row Char Functions,
  129.  See also: 1 row number, conversion, date functions, error reporting,
  130.  32,1 Row Char Functions,
  131.                  group, other functions, commands, menu.
  132.   1,1 Row Number Functions,
  133.  
  134.   2,1 Row Number Functions,
  135.  
  136.   3,1 Row Number Functions,
  137.                    1 Row Number Functions
  138.   4,1 Row Number Functions,
  139.  
  140.   5,1 Row Number Functions,
  141.  ABS(n)        Returns the absolute value of n.
  142.   6,1 Row Number Functions,
  143.  
  144.   7,1 Row Number Functions,
  145.  CEIL(n)       Returns the smallest integer greater than or equal to n.
  146.   8,1 Row Number Functions,
  147.  
  148.   9,1 Row Number Functions,
  149.  FLOOR(n)      Returns the largest integer less than or equal to n.
  150.  10,1 Row Number Functions,
  151.  
  152.  11,1 Row Number Functions,
  153.  MOD(m,n)      Returns result of m divided by n; or if n=0, m returned.
  154.  12,1 Row Number Functions,
  155.  
  156.  13,1 Row Number Functions,
  157.  POWER(m,n)    Returns m raised to the nth power; n must be an integer.
  158.  14,1 Row Number Functions,
  159.  
  160.  15,1 Row Number Functions,
  161.  ROUND(m,n)    Returns m rounded to n (optional) decimal places.
  162.  16,1 Row Number Functions,
  163.  
  164.  17,1 Row Number Functions,
  165.  SIGN(n)       Returns -1 if n is negative, 1 if n is positive, 0 if n=0.
  166.  18,1 Row Number Functions,
  167.  
  168.  19,1 Row Number Functions,
  169.  SQRT(n)       Returns the square root of n.
  170.  20,1 Row Number Functions,
  171.  
  172.  21,1 Row Number Functions,
  173.  TRUNC(m,n)    Strips m to n (opt) places; -n adds n zeros to an integer.
  174.  22,1 Row Number Functions,
  175.  
  176.  23,1 Row Number Functions,
  177.  
  178.  24,1 Row Number Functions,
  179.  See also: 1 row char, conversion, date functions, error reporting,
  180.  25,1 Row Number Functions,
  181.                   group, other functions, commands, menu.
  182.   1,@,
  183.  @
  184.   2,@,
  185.                                @ ("at" sign)
  186.   3,@,
  187.  
  188.   4,@,
  189.  @ file_name[.ext ]
  190.   5,@,
  191.  
  192.   6,@,
  193.  Runs the specified command file.
  194.   7,@,
  195.  
  196.   8,@,
  197.      file_name[.ext ]
  198.   9,@,
  199.          is the command file you wish to run. If you omit ext, SQL*Plus
  200.  10,@,
  201.          assumes the default command-file extension (usually SQL).  To
  202.  11,@,
  203.          change the default extension, use the SUFFIX clause of the SET
  204.  12,@,
  205.          command.  Use @file_name or @ file_name; the space is optional.
  206.  13,@,
  207.          Case may be significant in some operating environments.
  208.  14,@,
  209.  
  210.  15,@,
  211.  You can include in a command file any typeable command--usually SQL or
  212.  16,@,
  213.  SQL*Plus commands.  The @ command works like START, but does not allow
  214.  17,@,
  215.  values to be passed to parameters.
  216.  18,@,
  217.  
  218.  19,@,
  219.  Examples:
  220.  20,@,
  221.  
  222.  21,@,
  223.      To run a command file named PRINTRPT.SQL, enter:
  224.  22,@,
  225.  
  226.  23,@,
  227.          SQL> @PRINTRPT
  228.  24,@,
  229.  
  230.  25,@,
  231.  
  232.  26,@,
  233.      To run the command file WKRPT with the extension QRY, enter:
  234.  27,@,
  235.  
  236.  28,@,
  237.          SQL> @WKRPT.QRY
  238.  29,@,
  239.  
  240.  30,@,
  241.  
  242.  31,@,
  243.  See also: suffix, start, /, edit, run, get, set (SQL buffer), spool,
  244.  32,@,
  245.            list, save, parameters, commands, menu.
  246.   1,ACCEPT,
  247.  
  248.   2,ACCEPT,
  249.  
  250.   3,ACCEPT,
  251.                                    ACCEPT
  252.   4,ACCEPT,
  253.  
  254.   5,ACCEPT,
  255.  ACC[EPT] variable [NUM[BER]|CHAR] [PROMPT text|NOPR[OMPT]] [HIDE]
  256.   6,ACCEPT,
  257.  
  258.   7,ACCEPT,
  259.  ACCEPT reads a line of input and stores it in a given user variable.
  260.   8,ACCEPT,
  261.  
  262.   9,ACCEPT,
  263.      variable
  264.  10,ACCEPT,
  265.          is the name of the variable in which you wish to store a value.
  266.  11,ACCEPT,
  267.          If variable doesn't exist, SQL*Plus creates it.
  268.  12,ACCEPT,
  269.  
  270.  13,ACCEPT,
  271.      NUM[BER]
  272.  14,ACCEPT,
  273.          restricts the datatype of variable to the datatype NUMBER.  If the
  274.  15,ACCEPT,
  275.          reply does not match the datatype, ACCEPT gives an error message
  276.  16,ACCEPT,
  277.          and terminates.
  278.  17,ACCEPT,
  279.  
  280.  18,ACCEPT,
  281.      CHAR
  282.  19,ACCEPT,
  283.          restricts the datatype of variable to the datatype CHAR.  If the
  284.  20,ACCEPT,
  285.          reply does not match the datatype, ACCEPT gives an error message
  286.  21,ACCEPT,
  287.          and terminates.
  288.  22,ACCEPT,
  289.  
  290.  23,ACCEPT,
  291.      PROMPT text
  292.  24,ACCEPT,
  293.          displays text on-screen before accepting the value of variable
  294.  25,ACCEPT,
  295.          from the user.
  296.  26,ACCEPT,
  297.  
  298.  27,ACCEPT,
  299.      NOPR[OMPT]
  300.  28,ACCEPT,
  301.          skips a line and waits for input; prompt not displayed.
  302.  29,ACCEPT,
  303.  
  304.  30,ACCEPT,
  305.      HIDE
  306.  31,ACCEPT,
  307.          suppresses the display as you type the reply.
  308.  32,ACCEPT,
  309.  
  310.  33,ACCEPT,
  311.  
  312.  34,ACCEPT,
  313.  Examples: To display the prompt text "Salary: " and place the reply in a
  314.  35,ACCEPT,
  315.            NUMBER variable named SALARY, enter:
  316.  36,ACCEPT,
  317.  
  318.  37,ACCEPT,
  319.                SQL> ACCEPT salary NUMBER PROMPT 'Salary: '
  320.  38,ACCEPT,
  321.  
  322.  39,ACCEPT,
  323.  
  324.  40,ACCEPT,
  325.            To display the prompt "Password: ", and place the reply in the
  326.  41,ACCEPT,
  327.            CHAR variable PSWD, while suppressing the display, enter:
  328.  42,ACCEPT,
  329.  
  330.  43,ACCEPT,
  331.                SQL> ACCEPT pswd CHAR PROMPT 'Password: ' HIDE
  332.  44,ACCEPT,
  333.  
  334.  45,ACCEPT,
  335.  
  336.  46,ACCEPT,
  337.  See also: define, input, prompt, parameters, commands, menu.
  338.   1,ALTER CLUSTER,
  339.  
  340.   2,ALTER CLUSTER,
  341.  
  342.   3,ALTER CLUSTER,
  343.                                 ALTER CLUSTER
  344.   4,ALTER CLUSTER,
  345.                                                             SQL statement
  346.   5,ALTER CLUSTER,
  347.  
  348.   6,ALTER CLUSTER,
  349.  ALTER CLUSTER user.cluster      --user. and clauses below optional
  350.   7,ALTER CLUSTER,
  351.     PCTUSED integer              --min space use per block; default is 40
  352.   8,ALTER CLUSTER,
  353.     PCTFREE integer              --% of block for updates; default is 10
  354.   9,ALTER CLUSTER,
  355.     SIZE integer                 --the number of cluster keys stored
  356.  10,ALTER CLUSTER,
  357.     INITRANS integer             --initial number of transactions entries
  358.  11,ALTER CLUSTER,
  359.     MAXTRANS integer             --maximum number of transactions at once
  360.  12,ALTER CLUSTER,
  361.     STORAGE clause               --controls space allocation
  362.  13,ALTER CLUSTER,
  363.  
  364.  14,ALTER CLUSTER,
  365.  
  366.  15,ALTER CLUSTER,
  367.  ALTER CLUSTER redefines a cluster's future storage allocations.  You can
  368.  16,ALTER CLUSTER,
  369.  change any of the parameters listed, but you cannot:
  370.  17,ALTER CLUSTER,
  371.  
  372.  18,ALTER CLUSTER,
  373.     -  change the number or name of columns in a cluster key
  374.  19,ALTER CLUSTER,
  375.     -  alter the MINEXTENTS parameter
  376.  20,ALTER CLUSTER,
  377.     -  alter any parameters affecting blocks already allocated
  378.  21,ALTER CLUSTER,
  379.     -  remove tables from a cluster (use DROP CLUSTER and DROP TABLE)
  380.  22,ALTER CLUSTER,
  381.     -  alter a cluster's tablespace
  382.  23,ALTER CLUSTER,
  383.  
  384.  24,ALTER CLUSTER,
  385.  See also: create cluster, create table, commands, menu.
  386.   1,ALTER DATABASE,
  387.  
  388.   2,ALTER DATABASE,
  389.  
  390.   3,ALTER DATABASE,
  391.                                 ALTER DATABASE
  392.   4,ALTER DATABASE,
  393.                                                         SQL statement
  394.   5,ALTER DATABASE,
  395.  ALTER DATABASE database
  396.   6,ALTER DATABASE,
  397.     ADD LOGFILE 'filename' SIZE integer K | M REUSE,...
  398.   7,ALTER DATABASE,
  399.     DROP LOGFILE 'filename', 'filename',...
  400.   8,ALTER DATABASE,
  401.     RENAME FILE 'filename', 'filename',...
  402.   9,ALTER DATABASE,
  403.              TO 'filename', 'filename',...
  404.  10,ALTER DATABASE,
  405.     ARCHIVELOG | NOARCHIVELOG
  406.  11,ALTER DATABASE,
  407.     MOUNT SHARED | EXCLUSIVE
  408.  12,ALTER DATABASE,
  409.     DISMOUNT
  410.  13,ALTER DATABASE,
  411.     OPEN | CLOSE NORMAL | IMMEDIATE
  412.  14,ALTER DATABASE,
  413.  
  414.  15,ALTER DATABASE,
  415.  Use the ALTER DATABASE statement to mount a database, either shared
  416.  16,ALTER DATABASE,
  417.  or exclusive; open or close a database; add, drop, or rename a redo
  418.  17,ALTER DATABASE,
  419.  log file; or rename a database file.  You can also set the redo log
  420.  18,ALTER DATABASE,
  421.  to be archived (useful for media recovery), or not archived (useful
  422.  19,ALTER DATABASE,
  423.  only for instance recovery).  If database is omitted, the value for
  424.  20,ALTER DATABASE,
  425.  DB_NAME in the current INIT.ORA file is assumed.
  426.  21,ALTER DATABASE,
  427.  
  428.  22,ALTER DATABASE,
  429.  
  430.  23,ALTER DATABASE,
  431.  See also: create database, commands, menu.
  432.   1,ALTER INDEX,
  433.  
  434.   2,ALTER INDEX,
  435.  
  436.   3,ALTER INDEX,
  437.                                  ALTER INDEX
  438.   4,ALTER INDEX,
  439.                                                           SQL statement
  440.   5,ALTER INDEX,
  441.  ALTER INDEX user.index
  442.   6,ALTER INDEX,
  443.     INITRANS integer
  444.   7,ALTER INDEX,
  445.     MAXTRANS integer
  446.   8,ALTER INDEX,
  447.     STORAGE clause
  448.   9,ALTER INDEX,
  449.  
  450.  10,ALTER INDEX,
  451.  Use the ALTER INDEX statement to change future storage allocations for
  452.  11,ALTER INDEX,
  453.  index blocks.  INITRANS, MAXTRANS, and STORAGE work the same way they
  454.  12,ALTER INDEX,
  455.  do in the CREATE TABLE statement.
  456.  13,ALTER INDEX,
  457.  
  458.  14,ALTER INDEX,
  459.  
  460.  15,ALTER INDEX,
  461.  See also: create index, create table, commands, menu.
  462.   1,ALTER ROLLBACK SEGMENT,
  463.  
  464.   2,ALTER ROLLBACK SEGMENT,
  465.  
  466.   3,ALTER ROLLBACK SEGMENT,
  467.                              ALTER ROLLBACK SEGMENT
  468.   4,ALTER ROLLBACK SEGMENT,
  469.                                                             SQL statement
  470.   5,ALTER ROLLBACK SEGMENT,
  471.  ALTER PUBLIC ROLLBACK SEGMENT segment
  472.   6,ALTER ROLLBACK SEGMENT,
  473.    STORAGE clause
  474.   7,ALTER ROLLBACK SEGMENT,
  475.  
  476.   8,ALTER ROLLBACK SEGMENT,
  477.  
  478.   9,ALTER ROLLBACK SEGMENT,
  479.  Use ALTER ROLLBACK SEGMENT to make a rollback segment public or alter its
  480.  10,ALTER ROLLBACK SEGMENT,
  481.  storage parameters.  Use PUBLIC to make a rollback segment available for
  482.  11,ALTER ROLLBACK SEGMENT,
  483.  use in any instance.  To make a public rollback segment private, you must
  484.  12,ALTER ROLLBACK SEGMENT,
  485.  DROP it, then CREATE it again.
  486.  13,ALTER ROLLBACK SEGMENT,
  487.  
  488.  14,ALTER ROLLBACK SEGMENT,
  489.  The STORAGE clause affects future space allocation in a rollback segment.
  490.  15,ALTER ROLLBACK SEGMENT,
  491.  You can't use INITIAL or MINEXTENTS to alter an existing rollback segment.
  492.  16,ALTER ROLLBACK SEGMENT,
  493.  
  494.  17,ALTER ROLLBACK SEGMENT,
  495.  
  496.  18,ALTER ROLLBACK SEGMENT,
  497.  See also: create database, create rollback, create tablespace, rollback,
  498.  19,ALTER ROLLBACK SEGMENT,
  499.            commands, menu.
  500.   1,ALTER SEQUENCE,
  501.  
  502.   2,ALTER SEQUENCE,
  503.  
  504.   3,ALTER SEQUENCE,
  505.                                    ALTER SEQUENCE
  506.   4,ALTER SEQUENCE,
  507.                                                              SQL statement
  508.   5,ALTER SEQUENCE,
  509.  ALTER SEQUENCE user.sequence
  510.   6,ALTER SEQUENCE,
  511.        INCREMENT BY integer
  512.   7,ALTER SEQUENCE,
  513.        MAXVALUE integer | NOMAXVALUE
  514.   8,ALTER SEQUENCE,
  515.        MINVALUE integer | NOMINVALUE
  516.   9,ALTER SEQUENCE,
  517.        CYCLE | NOCYCLE
  518.  10,ALTER SEQUENCE,
  519.        CACHE integer | NOCACHE
  520.  11,ALTER SEQUENCE,
  521.        ORDER | NOORDER
  522.  12,ALTER SEQUENCE,
  523.  
  524.  13,ALTER SEQUENCE,
  525.  Use ALTER SEQUENCE to change the future increment of sequence numbers,
  526.  14,ALTER SEQUENCE,
  527.  to reset or remove its MINVALUE or MAXVALUE, or to turn CACHE and ORDER
  528.  15,ALTER SEQUENCE,
  529.  on or off. The CACHE integer must be smaller than the difference between
  530.  16,ALTER SEQUENCE,
  531.  MAXVALUE and MINVALUE. If you use CYCLE, an ascending sequence gives its
  532.  17,ALTER SEQUENCE,
  533.  MINVALUE after reaching MAXVALUE, and a descending sequence gives its
  534.  18,ALTER SEQUENCE,
  535.  MAXVALUE after reaching MINVALUE.
  536.  19,ALTER SEQUENCE,
  537.  
  538.  20,ALTER SEQUENCE,
  539.  To restart a sequence at a new number, DROP and CREATE it again.
  540.  21,ALTER SEQUENCE,
  541.  
  542.  22,ALTER SEQUENCE,
  543.  
  544.  23,ALTER SEQUENCE,
  545.  See also: sequences, create sequence, drop sequence, commands, menu.
  546.   1,ALTER TABLE,
  547.  
  548.   2,ALTER TABLE,
  549.  
  550.   3,ALTER TABLE,
  551.                                  ALTER TABLE
  552.   4,ALTER TABLE,
  553.                                                            SQL statement
  554.   5,ALTER TABLE,
  555.  ALTER TABLE user.table
  556.   6,ALTER TABLE,
  557.     ADD column_element | table_constraint,
  558.   7,ALTER TABLE,
  559.         column_element | table_constraint,...
  560.   8,ALTER TABLE,
  561.     MODIFY column_element, column_element,...
  562.   9,ALTER TABLE,
  563.     DROP CONSTRAINT constraint, constraint,...
  564.  10,ALTER TABLE,
  565.     PCTFREE integer   PCTUSED integer
  566.  11,ALTER TABLE,
  567.     INITRANS integer  MAXTRANS integer
  568.  12,ALTER TABLE,
  569.     STORAGE clause
  570.  13,ALTER TABLE,
  571.     BACKUP
  572.  14,ALTER TABLE,
  573.  
  574.  15,ALTER TABLE,
  575.  Use ALTER TABLE to add columns or constraints to a table, change column
  576.  16,ALTER TABLE,
  577.  datatypes, sizes, and NOT NULL settings, drop constraints, change future
  578.  17,ALTER TABLE,
  579.  storage allocations, and update the data dictionary to show that a BACKUP
  580.  18,ALTER TABLE,
  581.  of the table occurred when the statement was executed.
  582.  19,ALTER TABLE,
  583.  
  584.  20,ALTER TABLE,
  585.  
  586.  21,ALTER TABLE,
  587.  See also: tables, create table, constraint, commands, menu.
  588.   1,ALTER TABLESPACE,
  589.  
  590.   2,ALTER TABLESPACE,
  591.  
  592.   3,ALTER TABLESPACE,
  593.                               ALTER TABLESPACE
  594.   4,ALTER TABLESPACE,
  595.                                                          SQL statement
  596.   5,ALTER TABLESPACE,
  597.  ALTER TABLESPACE tablespace
  598.   6,ALTER TABLESPACE,
  599.  ADD DATAFILE 'filename' SIZE integer K | M REUSE,...
  600.   7,ALTER TABLESPACE,
  601.  RENAME DATAFILE 'filename', 'filename',...
  602.   8,ALTER TABLESPACE,
  603.                 TO 'filename', 'filename',...
  604.   9,ALTER TABLESPACE,
  605.  DEFAULT STORAGE clause
  606.  10,ALTER TABLESPACE,
  607.  ONLINE | OFFLINE NORMAL | IMMEDIATE
  608.  11,ALTER TABLESPACE,
  609.  BEGIN BACKUP | END BACKUP
  610.  12,ALTER TABLESPACE,
  611.  
  612.  13,ALTER TABLESPACE,
  613.  Use ALTER TABLESPACE to add or rename database files, change default
  614.  14,ALTER TABLESPACE,
  615.  tablespace storage parameters, put the tablespace online or offline,
  616.  15,ALTER TABLESPACE,
  617.  and start or stop backup.  To rename one or more data files:
  618.  16,ALTER TABLESPACE,
  619.  
  620.  17,ALTER TABLESPACE,
  621.     1.  Take the tablespace offline.
  622.  18,ALTER TABLESPACE,
  623.     2.  Rename the files at the operating system level.
  624.  19,ALTER TABLESPACE,
  625.     3.  Rename the database files with with ALTER TABLESPACE.
  626.  20,ALTER TABLESPACE,
  627.     4.  Bring the tablespace back online.
  628.  21,ALTER TABLESPACE,
  629.  
  630.  22,ALTER TABLESPACE,
  631.  
  632.  23,ALTER TABLESPACE,
  633.  See also: create tablespace, create database, drop tablespace, dba,
  634.  24,ALTER TABLESPACE,
  635.            commands, menu.
  636.   1,ALTER USER,
  637.  
  638.   2,ALTER USER,
  639.  
  640.   3,ALTER USER,
  641.                                   ALTER USER
  642.   4,ALTER USER,
  643.                                                              SQL statement
  644.   5,ALTER USER,
  645.  ALTER USER username IDENTIFIED BY password
  646.   6,ALTER USER,
  647.     DEFAULT TABLESPACE tablespace
  648.   7,ALTER USER,
  649.     TEMPORARY TABLESPACE tablespace
  650.   8,ALTER USER,
  651.  
  652.   9,ALTER USER,
  653.  Use ALTER USER to change a user's password, the default tablespace for
  654.  10,ALTER USER,
  655.  object creation, or the default temporary tablespace for temporary
  656.  11,ALTER USER,
  657.  segments created for the user.
  658.  12,ALTER USER,
  659.  
  660.  13,ALTER USER,
  661.  A password may also be changed with the GRANT statement.  A user's default
  662.  14,ALTER USER,
  663.  tablespace is also set when that user is granted resource to a tablespace,
  664.  15,ALTER USER,
  665.  if it's the first tablespace to which the user has been granted resource.
  666.  16,ALTER USER,
  667.  The default temporary tablespace is also set to the first tablespace
  668.  17,ALTER USER,
  669.  granted to a user.
  670.  18,ALTER USER,
  671.  
  672.  19,ALTER USER,
  673.  
  674.  20,ALTER USER,
  675.  See also: user id, create tablespace, grant, commands, menu.
  676.   1,APPEND,
  677.  
  678.   2,APPEND,
  679.  
  680.   3,APPEND,
  681.                                      APPEND
  682.   4,APPEND,
  683.  
  684.   5,APPEND,
  685.  A[PPEND] text
  686.   6,APPEND,
  687.  
  688.   7,APPEND,
  689.  Use APPEND to add text to the end of the current line in the buffer.
  690.   8,APPEND,
  691.  
  692.   9,APPEND,
  693.      text
  694.  10,APPEND,
  695.          is the text you wish to append.  To separate text from preceding
  696.  11,APPEND,
  697.          characters with a space, enter two spaces between APPEND and the
  698.  12,APPEND,
  699.          text. To APPEND text that ends with a semicolon, end the APPEND
  700.  13,APPEND,
  701.          command with two semicolons (SQL*Plus interprets one semicolon as
  702.  14,APPEND,
  703.          an optional command terminator).
  704.  15,APPEND,
  705.  
  706.  16,APPEND,
  707.  
  708.  17,APPEND,
  709.  Examples: To append a space and the column name DEPT to the second line
  710.  18,APPEND,
  711.            of the buffer, make that line the current line by entering:
  712.  19,APPEND,
  713.  
  714.  20,APPEND,
  715.                SQL> 2
  716.  21,APPEND,
  717.                  2* FROM EMP
  718.  22,APPEND,
  719.  
  720.  23,APPEND,
  721.            Now enter APPEND:
  722.  24,APPEND,
  723.  
  724.  25,APPEND,
  725.                SQL> APPEND , DEPT
  726.  26,APPEND,
  727.                SQL> 2
  728.  27,APPEND,
  729.                  2* FROM EMP, DEPT
  730.  28,APPEND,
  731.  
  732.  29,APPEND,
  733.            The first space between APPEND and the comma separates APPEND
  734.  30,APPEND,
  735.            from the characters to be appended; the second space is the
  736.  31,APPEND,
  737.            first appended character.  To append a semicolon to the line,
  738.  32,APPEND,
  739.            enter:
  740.  33,APPEND,
  741.  
  742.  34,APPEND,
  743.                SQL> APPEND ;;
  744.  35,APPEND,
  745.  
  746.  36,APPEND,
  747.            SQL*Plus appends the first semicolon to the line.  The second
  748.  37,APPEND,
  749.            semicolon terminates the command.
  750.  38,APPEND,
  751.  
  752.  39,APPEND,
  753.  
  754.  40,APPEND,
  755.  See also: change, del, edit, input, list, save, set (SQL buffer), spool,
  756.  41,APPEND,
  757.            commands, menu.
  758.   1,AUDIT,
  759.  
  760.   2,AUDIT,
  761.  
  762.   3,AUDIT,
  763.                                    AUDIT
  764.   4,AUDIT,
  765.                                                             SQL statement
  766.   5,AUDIT,
  767.  There are two ways to use AUDIT:  one sets auditing options for database
  768.   6,AUDIT,
  769.  access, the other enables auditing of access to ORACLE objects (like
  770.   7,AUDIT,
  771.  tables and views).
  772.   8,AUDIT,
  773.  
  774.   9,AUDIT,
  775.  *First Method*
  776.  10,AUDIT,
  777.  
  778.  11,AUDIT,
  779.  AUDIT system_option, system_option,... | ALL
  780.  12,AUDIT,
  781.     WHENEVER SUCCESSFUL
  782.  13,AUDIT,
  783.     WHENEVER NOT SUCCESSFUL
  784.  14,AUDIT,
  785.  
  786.  15,AUDIT,
  787.  The first method of AUDIT sets auditing options for database access.  This
  788.  16,AUDIT,
  789.  AUDIT form tracks:
  790.  17,AUDIT,
  791.  
  792.  18,AUDIT,
  793.     -  connection to or disconnection from the database
  794.  19,AUDIT,
  795.     -  statements requiring RESOURCE privilege (RESOURCE system option)
  796.  20,AUDIT,
  797.     -  statements requiring DBA privileges (DBA system option)
  798.  21,AUDIT,
  799.     -  statements returning error ORA-942 "table or view does not exist"
  800.  22,AUDIT,
  801.            (NOT EXISTS system option)
  802.  23,AUDIT,
  803.  
  804.  24,AUDIT,
  805.  Auditing is enabled system-wide via the AUDIT_TRAIL parameter of INIT.ORA.
  806.  25,AUDIT,
  807.  If auditing is not enabled, AUDIT SQL statements execute successfully, but
  808.  26,AUDIT,
  809.  no audit trail rows are written.  All audit results go to data dictionary
  810.  27,AUDIT,
  811.  tables.  As audit data dictionary tables grow, you may archive old audit
  812.  28,AUDIT,
  813.  records, then delete them.  Never drop the audit data dictionary tables.
  814.  29,AUDIT,
  815.  
  816.  30,AUDIT,
  817.  *Second Method*
  818.  31,AUDIT,
  819.  
  820.  32,AUDIT,
  821.  AUDIT table_option, table_option,... | ALL
  822.  33,AUDIT,
  823.     ON user.table | DEFAULT
  824.  34,AUDIT,
  825.     BY SESSION | BY ACCESS
  826.  35,AUDIT,
  827.     WHENEVER SUCCESSFUL | WHENEVER NOT SUCCESSFUL
  828.  36,AUDIT,
  829.  
  830.  37,AUDIT,
  831.  The second method of AUDIT enables auditing of access to ORACLE objects
  832.  38,AUDIT,
  833.  like tables and views.
  834.  39,AUDIT,
  835.  
  836.  40,AUDIT,
  837.     BY SESSION or BY ACCESS
  838.  41,AUDIT,
  839.         specifies how rows are written to table AUDIT_TRAIL.  BY SESSION
  840.  42,AUDIT,
  841.         records the type of access made to an object by updating a single
  842.  43,AUDIT,
  843.         row for that session in AUDIT_TRAIL.  BY ACCESS records the type
  844.  44,AUDIT,
  845.         of access made and how often it was made by inserting a new row
  846.  45,AUDIT,
  847.         in AUDIT_TRAIL for each access.  The default is BY SESSION.
  848.  46,AUDIT,
  849.  
  850.  47,AUDIT,
  851.     WHENEVER SUCCESSFUL or WHENEVER NOT SUCCESSFUL
  852.  48,AUDIT,
  853.         sets SQL statements to be audited only when they are successfully
  854.  49,AUDIT,
  855.         completed, or only when they are not successfully completed.
  856.  50,AUDIT,
  857.  
  858.  51,AUDIT,
  859.  See also: noaudit, commands, menu.
  860.   1,Alias,
  861.  
  862.   2,Alias,
  863.  
  864.   3,Alias,
  865.                                Alias
  866.   4,Alias,
  867.  
  868.   5,Alias,
  869.  An alias is an alternative name for a column or table, active only
  870.   6,Alias,
  871.  within the statement in which the alias is assigned. When an alias
  872.   7,Alias,
  873.  name follows the name of a column in a SELECT list, the alias name
  874.   8,Alias,
  875.  appears above the column in the report:
  876.   9,Alias,
  877.                                                NAME     NUM  SALARY
  878.  10,Alias,
  879.  SELECT ename NAME, empno NUM, sal SALARY      --------------------
  880.  11,Alias,
  881.    FROM emp                                    ADAMS   7876    1100
  882.  12,Alias,
  883.    WHERE job = 'ANALYST'                       JAMES   7900     950
  884.  13,Alias,
  885.    ORDER BY NAME;                              MILLER  7934     800
  886.  14,Alias,
  887.  
  888.  15,Alias,
  889.  Use a table alias to join a table to itself in a correlated query:
  890.  16,Alias,
  891.  
  892.  17,Alias,
  893.  SELECT wkr.ename, wkr.sal, sup.ename, sup.sal
  894.  18,Alias,
  895.    FROM emp wkr, emp sup                     ENAME  SAL  ENAME  SAL
  896.  19,Alias,
  897.    WHERE wkr.mgr = sup.empno                 ----------------------
  898.  20,Alias,
  899.      AND wkr.sal > sup.sal;                  SCOTT 3000  JONES 2975
  900.  21,Alias,
  901.                                              FORD  3000  JONES 2975
  902.  22,Alias,
  903.  
  904.  23,Alias,
  905.  
  906.  24,Alias,
  907.  See also: select, select list, join, correlated query, menu.
  908.   1,Arithmetic Operators,
  909.  
  910.   2,Arithmetic Operators,
  911.  
  912.   3,Arithmetic Operators,
  913.                   Arithmetic and Character Operators
  914.   4,Arithmetic Operators,
  915.  
  916.   5,Arithmetic Operators,
  917.  Arithmetic operators in SQL manipulate and return numeric values; some
  918.   6,Arithmetic Operators,
  919.  also handle date arithmetic.
  920.   7,Arithmetic Operators,
  921.  
  922.   8,Arithmetic Operators,
  923.  Operator   Function                        Example
  924.   9,Arithmetic Operators,
  925.  ------------------------------------------------------------------------
  926.  10,Arithmetic Operators,
  927.    ()       Override precedence rules       SELECT (x + y)/2...
  928.  11,Arithmetic Operators,
  929.    + -      Positive, negative value        ...WHERE bal <= -50
  930.  12,Arithmetic Operators,
  931.    * /      Multiply, divide                SELECT discount * 100...
  932.  13,Arithmetic Operators,
  933.    + -      Add, subtract                   SELECT price - discount...
  934.  14,Arithmetic Operators,
  935.  
  936.  15,Arithmetic Operators,
  937.  
  938.  16,Arithmetic Operators,
  939.  The || character operator concatenates (puts together) CHAR (string)
  940.  17,Arithmetic Operators,
  941.  values. Spaces are significant within 'apostrophes', but not outside
  942.  18,Arithmetic Operators,
  943.  them.  Note these expressions and examples of results they return:
  944.  19,Arithmetic Operators,
  945.  
  946.  20,Arithmetic Operators,
  947.    'Contact '||fname || ' ' ||    lname     Contact Daniel Altman
  948.  21,Arithmetic Operators,
  949.    ename || ' gets '|| sal || per month     King gets $5000 per month
  950.  22,Arithmetic Operators,
  951.  
  952.  23,Arithmetic Operators,
  953.  See also: char, comparison, like operator, logical operators,
  954.  24,Arithmetic Operators,
  955.            set operators, other operators, menu.
  956.   1,Attributes,
  957.  
  958.   2,Attributes,
  959.  
  960.   3,Attributes,
  961.                              Attributes
  962.   4,Attributes,
  963.  
  964.   5,Attributes,
  965.  DECLARE
  966.   6,Attributes,
  967.      variable1  table.column%TYPE
  968.   7,Attributes,
  969.      variable2  variable_or_constant%TYPE
  970.   8,Attributes,
  971.  
  972.   9,Attributes,
  973.  Use the %TYPE attribute in declarations to set the datatype of any
  974.  10,Attributes,
  975.  variable or constant to be the same as the datatype of an existing
  976.  11,Attributes,
  977.  variable, constant, or column in a table.  Benefit: You don't have
  978.  12,Attributes,
  979.  to know the datatype or the parameters of a referenced column, and
  980.  13,Attributes,
  981.  if you change the column, the variable's datatype changes also.
  982.  14,Attributes,
  983.  
  984.  15,Attributes,
  985.  Use %ROWTYPE in declaring a record variable to hold all data in a
  986.  16,Attributes,
  987.  row of a table or view, or a row from a FETCH.  Reference fields of
  988.  17,Attributes,
  989.  records declared %ROWTYPE by using record_name.column_name.
  990.  18,Attributes,
  991.          DECLARE
  992.  19,Attributes,
  993.             CURSOR nextclient
  994.  20,Attributes,
  995.                IS SELECT fname, lname, phone
  996.  21,Attributes,
  997.                FROM clients;
  998.  22,Attributes,
  999.          callrecord nextclient%ROWTYPE;...
  1000.  23,Attributes,
  1001.          BEGIN
  1002.  24,Attributes,
  1003.             OPEN nextclient;
  1004.  25,Attributes,
  1005.             FETCH nextclient INTO callrecord;
  1006.  26,Attributes,
  1007.         
  1008.  27,Attributes,
  1009.  See also: declare, variables, fetch, cursors, menu.
  1010.   1,BEGIN,
  1011.  
  1012.   2,BEGIN,
  1013.  
  1014.   3,BEGIN,
  1015.                                  BEGIN
  1016.   4,BEGIN,
  1017.                                                    PL/SQL statement
  1018.   5,BEGIN,
  1019.  <<label_name>>
  1020.   6,BEGIN,
  1021.  BEGIN
  1022.   7,BEGIN,
  1023.     rest_of_block
  1024.   8,BEGIN,
  1025.  
  1026.   9,BEGIN,
  1027.  
  1028.  10,BEGIN,
  1029.  BEGIN signals the completion of a block's DECLARE section (if any)
  1030.  11,BEGIN,
  1031.  and starts the executable part of the block. Every block must have
  1032.  12,BEGIN,
  1033.  at least one executable statement. Each BEGIN must have a matching
  1034.  13,BEGIN,
  1035.  END statement to conclude the block.
  1036.  14,BEGIN,
  1037.  
  1038.  15,BEGIN,
  1039.  <<label_name>> is optional, but if you use one at the beginning of
  1040.  16,BEGIN,
  1041.  a block, you must add the name to the END statement that concludes
  1042.  17,BEGIN,
  1043.  that block.
  1044.  18,BEGIN,
  1045.  
  1046.  19,BEGIN,
  1047.  
  1048.  20,BEGIN,
  1049.  
  1050.  21,BEGIN,
  1051.  See also: blocks, declare, exception, end, commands, menu.
  1052.   1,BNF Syntax,
  1053.  
  1054.   2,BNF Syntax,
  1055.  
  1056.   3,BNF Syntax,
  1057.                                 BNF Syntax
  1058.   4,BNF Syntax,
  1059.  
  1060.   5,BNF Syntax,
  1061.  {Braces} enclose required items; you MUST enter one from the list of
  1062.   6,BNF Syntax,
  1063.  items separated by vertical bars. [Brackets] enclose optional items;
  1064.   7,BNF Syntax,
  1065.  you MAY enter one from the list of items separated by vertical bars.
  1066.   8,BNF Syntax,
  1067.  Three periods mean that the preceding item may be repeated.  Do not
  1068.   9,BNF Syntax,
  1069.  enter the braces, brackets, or vertical bars.
  1070.  10,BNF Syntax,
  1071.  
  1072.  11,BNF Syntax,
  1073.  Parentheses enclose parameter lists; commas separate items in a list.
  1074.  12,BNF Syntax,
  1075.  UPPERCASE indicates specific words to be used; lowercase shows names
  1076.  13,BNF Syntax,
  1077.  and expressions that vary.
  1078.  14,BNF Syntax,
  1079.  
  1080.  15,BNF Syntax,
  1081.    COMMIT [WORK]
  1082.  16,BNF Syntax,
  1083.  
  1084.  17,BNF Syntax,
  1085.    DELETE FROM [user.]table [alias] [WHERE condition]
  1086.  18,BNF Syntax,
  1087.  
  1088.  19,BNF Syntax,
  1089.    INSERT INTO [user.]table [ (column [, column]...) ]
  1090.  20,BNF Syntax,
  1091.       { VALUES (value [, value]...) | query }
  1092.  21,BNF Syntax,
  1093.  
  1094.  22,BNF Syntax,
  1095.    LOCK TABLE [user.]table [, [user.]table ]...
  1096.  23,BNF Syntax,
  1097.  
  1098.  24,BNF Syntax,
  1099.    ROLLBACK [WORK] [TO [SAVEPOINT] savepoint]
  1100.  25,BNF Syntax,
  1101.  
  1102.  26,BNF Syntax,
  1103.    SAVEPOINT savepoint
  1104.  27,BNF Syntax,
  1105.  
  1106.  28,BNF Syntax,
  1107.    SELECT [ALL|DISTINCT] { * | table.* | expr [column_alias]}
  1108.  29,BNF Syntax,
  1109.           [, {table.* | expr [column_alias] } ]... }
  1110.  30,BNF Syntax,
  1111.      FROM [user.]table [table_alias] [,[user.]table [table_alias]]...
  1112.  31,BNF Syntax,
  1113.      [ WHERE condition ]
  1114.  32,BNF Syntax,
  1115.      [ CONNECT BY condition [START WITH condition] ]
  1116.  33,BNF Syntax,
  1117.      [ GROUP BY expr[, expr]... [HAVING condition] ]
  1118.  34,BNF Syntax,
  1119.      [ {UNION | INTERSECT | MINUS} SELECT ... ]
  1120.  35,BNF Syntax,
  1121.      [ ORDER BY {expr | position} [ASC | DESC]
  1122.  36,BNF Syntax,
  1123.           [, {expr | position} [ASC | DESC]] ]...
  1124.  37,BNF Syntax,
  1125.      [ FOR UPDATE OF column [, column]... [NOWAIT] ]
  1126.  38,BNF Syntax,
  1127.  
  1128.  39,BNF Syntax,
  1129.    SET TRANSACTION [READ ONLY]
  1130.  40,BNF Syntax,
  1131.  
  1132.  41,BNF Syntax,
  1133.    UPDATE [user.]table [alias]
  1134.  42,BNF Syntax,
  1135.      SET column = expr [, column = expr]...
  1136.  43,BNF Syntax,
  1137.      [WHERE condition]
  1138.  44,BNF Syntax,
  1139.  
  1140.  45,BNF Syntax,
  1141.    UPDATE [user.]table [alias]
  1142.  46,BNF Syntax,
  1143.      SET (column [, column] ... ) = (query) [,...]
  1144.  47,BNF Syntax,
  1145.      [WHERE condition]
  1146.  48,BNF Syntax,
  1147.  
  1148.  49,BNF Syntax,
  1149.  
  1150.  50,BNF Syntax,
  1151.  See any command listed above; see also: commands, identifiers, menu.
  1152.   1,BOOLEAN,
  1153.  
  1154.   2,BOOLEAN,
  1155.  
  1156.   3,BOOLEAN,
  1157.                              BOOLEAN
  1158.   4,BOOLEAN,
  1159.  
  1160.   5,BOOLEAN,
  1161.  BOOLEAN                                               --no parameters
  1162.   6,BOOLEAN,
  1163.  
  1164.   7,BOOLEAN,
  1165.  Used only in PL/SQL, variables declared to be of the BOOLEAN datatype
  1166.   8,BOOLEAN,
  1167.  may only contain one of the predefined constant values:  TRUE, FALSE,
  1168.   9,BOOLEAN,
  1169.  or NULL.
  1170.  10,BOOLEAN,
  1171.  
  1172.  11,BOOLEAN,
  1173.  You cannot retrieve a value into a BOOLEAN variable, nor can you
  1174.  12,BOOLEAN,
  1175.  INSERT a BOOLEAN value into a database.
  1176.  13,BOOLEAN,
  1177.  
  1178.  14,BOOLEAN,
  1179.  
  1180.  15,BOOLEAN,
  1181.  
  1182.  16,BOOLEAN,
  1183.  See also: variables, boolean comparisons, menu.
  1184.   1,BREAK,
  1185.  
  1186.   2,BREAK,
  1187.  
  1188.   3,BREAK,
  1189.                                   BREAK
  1190.   4,BREAK,
  1191.  
  1192.   5,BREAK,
  1193.  BRE[AK] [ON report_element [action [action]]] ...
  1194.   6,BREAK,
  1195.  
  1196.   7,BREAK,
  1197.  where report_element and action require the following syntax:
  1198.   8,BREAK,
  1199.          report_element: {column | expression | ROW | REPORT}
  1200.   9,BREAK,
  1201.          action: [SKI[P] n|[SKI[P]] PAGE] [NODUP[LICATES] | DUP[LICATES]]
  1202.  10,BREAK,
  1203.  
  1204.  11,BREAK,
  1205.  BREAK specifies where and how to make format changes to a report.  You use
  1206.  12,BREAK,
  1207.  BREAK to:
  1208.  13,BREAK,
  1209.  
  1210.  14,BREAK,
  1211.      -   suppress the display of duplicate values for a given column
  1212.  15,BREAK,
  1213.      -   skip a line each time a given column value changes
  1214.  16,BREAK,
  1215.      -   COMPUTE figures when a given column value changes, or at the end
  1216.  17,BREAK,
  1217.              of a report (see COMPUTE)
  1218.  18,BREAK,
  1219.      -   list the current BREAK definition (by issuing the BREAK command
  1220.  19,BREAK,
  1221.              without any clauses following)
  1222.  20,BREAK,
  1223.  
  1224.  21,BREAK,
  1225.  BREAK also lists the current BREAK definition.  Each new BREAK command
  1226.  22,BREAK,
  1227.  replaces the preceding one.
  1228.  23,BREAK,
  1229.  
  1230.  24,BREAK,
  1231.  BREAK report_elements:
  1232.  25,BREAK,
  1233.  
  1234.  26,BREAK,
  1235.      ON column [action [action]]
  1236.  27,BREAK,
  1237.          specifies action(s) for SQL*Plus to take when a break occurs in
  1238.  28,BREAK,
  1239.          the break column.  A break is:
  1240.  29,BREAK,
  1241.  
  1242.  30,BREAK,
  1243.          -   a change in the value of a column or expression
  1244.  31,BREAK,
  1245.          -   the output of a row
  1246.  32,BREAK,
  1247.          -   the end of a report
  1248.  33,BREAK,
  1249.  
  1250.  34,BREAK,
  1251.          If you omit action(s), BREAK ON column suppresses printing of
  1252.  35,BREAK,
  1253.          duplicate values in the column, marking in the report where
  1254.  36,BREAK,
  1255.          SQL*Plus will perform the computation you specify in a matching
  1256.  37,BREAK,
  1257.          COMPUTE command.  You can specify ON column one or more times.
  1258.  38,BREAK,
  1259.  
  1260.  39,BREAK,
  1261.          Example:  If you specify multiple ON clauses, as in:
  1262.  40,BREAK,
  1263.  
  1264.  41,BREAK,
  1265.                    SQL> BREAK ON DEPTNO SKIP PAGE ON JOB SKIP 1 -
  1266.  42,BREAK,
  1267.                       > ON SAL SKIP 1
  1268.  43,BREAK,
  1269.  
  1270.  44,BREAK,
  1271.              the first ON clause is the outermost break (ON DEPTNO), and
  1272.  45,BREAK,
  1273.              the last ON clause is the innermost break (ON SAL).  SQL*Plus
  1274.  46,BREAK,
  1275.              searches each output row for the break(s), starting with the
  1276.  47,BREAK,
  1277.              outermost break and proceeding to the innermost in the order
  1278.  48,BREAK,
  1279.              you've entered the clauses.  In the example above, SQL*Plus
  1280.  49,BREAK,
  1281.              searches for a change in the value of DEPTNO, then JOB, then
  1282.  50,BREAK,
  1283.              SAL.
  1284.  51,BREAK,
  1285.  
  1286.  52,BREAK,
  1287.              Next, SQL*Plus executes the actions, beginning with the action
  1288.  53,BREAK,
  1289.              for the innermost break and proceeding in reverse order toward
  1290.  54,BREAK,
  1291.              the outermost break (from SKIP 1 for ON SAL toward SKIP PAGE
  1292.  55,BREAK,
  1293.              for ON DEPTNO). SQL*Plus executes each action, including the
  1294.  56,BREAK,
  1295.              action for the first occurring break found in the initial
  1296.  57,BREAK,
  1297.              search.
  1298.  58,BREAK,
  1299.  
  1300.  59,BREAK,
  1301.              If, for example, the value of JOB in a given row changes, but
  1302.  60,BREAK,
  1303.              the values of DEPTNO and SAL stay the same, SQL*Plus skips two
  1304.  61,BREAK,
  1305.              lines before printing the row: one as a result of SKIP 1 in
  1306.  62,BREAK,
  1307.              the ON SAL clause, the other as a result of SKIP 1 in the
  1308.  63,BREAK,
  1309.              ON JOB clause.
  1310.  64,BREAK,
  1311.  
  1312.  65,BREAK,
  1313.              When you use ON column, you should also use the ORDER BY clause
  1314.  66,BREAK,
  1315.              in the SELECT statement.  The columns usually should appear in
  1316.  67,BREAK,
  1317.              the same order in ORDER BY as they do in BREAK, so that breaks
  1318.  68,BREAK,
  1319.              do not occur at meaningless points in the report.  All the
  1320.  69,BREAK,
  1321.              columns listed in ORDER BY need not appear in the BREAK command.
  1322.  70,BREAK,
  1323.  
  1324.  71,BREAK,
  1325.  
  1326.  72,BREAK,
  1327.              The following SELECT produces meaningful results with the above
  1328.  73,BREAK,
  1329.              BREAK:
  1330.  74,BREAK,
  1331.  
  1332.  75,BREAK,
  1333.                    SQL> SELECT DEPTNO, JOB, SAL,ENAME
  1334.  76,BREAK,
  1335.                      2  FROM EMP
  1336.  77,BREAK,
  1337.                      3  ORDER BY DEPTNO, JOB, SAL, ENAME;
  1338.  78,BREAK,
  1339.  
  1340.  79,BREAK,
  1341.  
  1342.  80,BREAK,
  1343.              All rows with the same DEPTNO print together on one page, and
  1344.  81,BREAK,
  1345.              within that page all rows with the same JOB print in groups.
  1346.  82,BREAK,
  1347.              Within each group of jobs, those with the same SAL print in
  1348.  83,BREAK,
  1349.              groups.  Breaks in ENAME cause no action, because ENAME does
  1350.  84,BREAK,
  1351.              not appear in the BREAK command.
  1352.  85,BREAK,
  1353.  
  1354.  86,BREAK,
  1355.      ON expr [action [action]]
  1356.  87,BREAK,
  1357.          specifies action(s) for SQL*Plus to take when the value of the
  1358.  88,BREAK,
  1359.          expression changes.  If action(s) are omitted, BREAK ON expr
  1360.  89,BREAK,
  1361.          suppresses printing of duplicate values of expr, marking in the
  1362.  90,BREAK,
  1363.          report the place where SQL*Plus will perform the computation you
  1364.  91,BREAK,
  1365.          specify in a matching COMPUTE command.
  1366.  92,BREAK,
  1367.  
  1368.  93,BREAK,
  1369.          You can use an expression involving one or more table columns, or
  1370.  94,BREAK,
  1371.          an alias assigned to a report column in a SELECT statement or a
  1372.  95,BREAK,
  1373.          COLUMN command.  If you use an expression in a BREAK command, you
  1374.  96,BREAK,
  1375.          must enter expr exactly as it appears in SELECT; if the expression
  1376.  97,BREAK,
  1377.          in the SELECT statement is a+b, for example, you cannot use b+a or
  1378.  98,BREAK,
  1379.          (a+b) in a BREAK command to refer to the expression in the SELECT
  1380.  99,BREAK,
  1381.          statement.  The information for ON column also applies to ON expr.
  1382. 100,BREAK,
  1383.  
  1384. 101,BREAK,
  1385.      ON ROW [action [action]]
  1386. 102,BREAK,
  1387.          specifies action(s) for SQL*Plus to take when a SELECT statement
  1388. 103,BREAK,
  1389.          returns a row. The ROW break becomes the innermost break no matter
  1390. 104,BREAK,
  1391.          where it appears in the BREAK command.  You should always specify
  1392. 105,BREAK,
  1393.          an action when you BREAK on a row.
  1394. 106,BREAK,
  1395.  
  1396. 107,BREAK,
  1397.      ON REPORT
  1398. 108,BREAK,
  1399.          marks in a report the place where SQL*Plus will perform the
  1400. 109,BREAK,
  1401.          computation specified in a matching COMPUTE command.  Use BREAK
  1402. 110,BREAK,
  1403.          ON REPORT with COMPUTE to print grand totals or other "grand"
  1404. 111,BREAK,
  1405.          computed values.  The REPORT break becomes the outermost break
  1406. 112,BREAK,
  1407.          regardless of where you specify it in the BREAK command.
  1408. 113,BREAK,
  1409.  
  1410. 114,BREAK,
  1411.  BREAK actions:
  1412. 115,BREAK,
  1413.  
  1414. 116,BREAK,
  1415.      SKI[P] n
  1416. 117,BREAK,
  1417.          skips n lines before printing the row where the break occurred.
  1418. 118,BREAK,
  1419.  
  1420. 119,BREAK,
  1421.      [SKI[P]] PAGE
  1422. 120,BREAK,
  1423.          skips to a new page before printing the row where break occurred.
  1424. 121,BREAK,
  1425.  
  1426. 122,BREAK,
  1427.      NODUP[LICATES]
  1428. 123,BREAK,
  1429.          prints blanks rather than the value of a break column when the
  1430. 124,BREAK,
  1431.          value is a duplicate of the column's value in the preceding row.
  1432. 125,BREAK,
  1433.  
  1434. 126,BREAK,
  1435.      DUP[LICATES]
  1436. 127,BREAK,
  1437.          prints the value of a break column in every selected row.
  1438. 128,BREAK,
  1439.  
  1440. 129,BREAK,
  1441.              Example:  The example report below, produces prints duplicate
  1442. 130,BREAK,
  1443.              job values, prints the average of SAL, inserts one blank line
  1444. 131,BREAK,
  1445.              when the JOB value changes, and (when the value of DEPTNO
  1446. 132,BREAK,
  1447.              changes) prints the sum of SAL and inserts another blank line:
  1448. 133,BREAK,
  1449.  
  1450. 134,BREAK,
  1451.                    SQL> BREAK ON DEPTNO SKIP 1 ON JOB SKIP 1 DUPLICATES
  1452. 135,BREAK,
  1453.                    SQL> COMPUTE SUM OF SAL ON DEPTNO
  1454. 136,BREAK,
  1455.                    SQL> COMPUTE AVG OF SAL ON JOB
  1456. 137,BREAK,
  1457.                    SQL> SELECT DEPTNO, JOB, ENAME, SAL FROM EMP
  1458. 138,BREAK,
  1459.                      2  WHERE JOB IN ('CLERK', 'SALESMAN')
  1460. 139,BREAK,
  1461.                      3  AND DEPTNO IN (10, 30)
  1462. 140,BREAK,
  1463.                      4  ORDER BY DEPTNO, JOB;
  1464. 141,BREAK,
  1465.  
  1466. 142,BREAK,
  1467.              Output:
  1468. 143,BREAK,
  1469.  
  1470. 144,BREAK,
  1471.                   DEPTNO  JOB       ENAME       SAL
  1472. 145,BREAK,
  1473.                   ------ --------- --------- ------
  1474. 146,BREAK,
  1475.                       10  CLERK     MILLER     1300
  1476. 147,BREAK,
  1477.                           ********           ------
  1478. 148,BREAK,
  1479.                           avg                  1300
  1480. 149,BREAK,
  1481.  
  1482. 150,BREAK,
  1483.                   ******                     ------
  1484. 151,BREAK,
  1485.                   sum                          1300
  1486. 152,BREAK,
  1487.  
  1488. 153,BREAK,
  1489.                       30  CLERK     JAMES      1045
  1490. 154,BREAK,
  1491.                           ********           ------
  1492. 155,BREAK,
  1493.                           avg                  1045
  1494. 156,BREAK,
  1495.  
  1496. 157,BREAK,
  1497.                           SALESMAN  ALLEN      1760
  1498. 158,BREAK,
  1499.                           SALESMAN  MARTIN     1375
  1500. 159,BREAK,
  1501.                           SALESMAN  TURNER     1650
  1502. 160,BREAK,
  1503.                           SALESMAN  WARD       1375
  1504. 161,BREAK,
  1505.                           ********           ------
  1506. 162,BREAK,
  1507.                           avg                  1540
  1508. 163,BREAK,
  1509.  
  1510. 164,BREAK,
  1511.                   ******                     ------
  1512. 165,BREAK,
  1513.                    sum                         7205
  1514. 166,BREAK,
  1515.  
  1516. 167,BREAK,
  1517.  See also: compute, order by, select, SQL in PL/SQL, commands, menu.
  1518.   1,BTITLE,
  1519.  
  1520.   2,BTITLE,
  1521.  
  1522.   3,BTITLE,
  1523.                                    BTITLE
  1524.   4,BTITLE,
  1525.  
  1526.   5,BTITLE,
  1527.  BTI[TLE] [printspec [text | variable] ...] | [OFF|ON]
  1528.   6,BTITLE,
  1529.  
  1530.   7,BTITLE,
  1531.  BTITLE places and formats a title at the bottom of each report page, or
  1532.   8,BTITLE,
  1533.  lists the current BTITLE definition.  See TTITLE for a description of
  1534.   9,BTITLE,
  1535.  BTITLE clauses, and to learn how to print page numbers in the title. To
  1536.  10,BTITLE,
  1537.  list the current BTITLE definition, enter BTITLE with no clauses.
  1538.  11,BTITLE,
  1539.  
  1540.  12,BTITLE,
  1541.  SQL*Plus interprets BTITLE in the "new" form if a valid printspec clause
  1542.  13,BTITLE,
  1543.  (LEFT, SKIP, COL, etc.) immediately follows BTITLE.  See OLD (BTITLE) for
  1544.  14,BTITLE,
  1545.  a description of an alternative form of BTITLE.
  1546.  15,BTITLE,
  1547.  
  1548.  16,BTITLE,
  1549.  Examples: To set a bottom title with CORPORATE PLANNING DEPARTMENT on the
  1550.  17,BTITLE,
  1551.            left and a date on the right, enter:
  1552.  18,BTITLE,
  1553.  
  1554.  19,BTITLE,
  1555.                SQL> BTITLE LEFT 'CORPORATE PLANNING DEPARTMENT' -
  1556.  20,BTITLE,
  1557.                > RIGHT '11 Jan 1990'
  1558.  21,BTITLE,
  1559.  
  1560.  22,BTITLE,
  1561.            To set a bottom title with CONFIDENTIAL in column 50, followed
  1562.  23,BTITLE,
  1563.            by six spaces and a date, enter:
  1564.  24,BTITLE,
  1565.  
  1566.  25,BTITLE,
  1567.                SQL> BTITLE COL 50 'CONFIDENTIAL' TAB 6 '11 Jan 90'
  1568.  26,BTITLE,
  1569.  
  1570.  27,BTITLE,
  1571.  See also: old btitle, ttitle, commands, menu.
  1572.   1,Blocks,
  1573.  
  1574.   2,Blocks,
  1575.  
  1576.   3,Blocks,
  1577.                                   Blocks
  1578.   4,Blocks,
  1579.  
  1580.   5,Blocks,
  1581.  DECLARE             --Main block
  1582.   6,Blocks,
  1583.     variable_name1  datatype (expr);       --variables, constants, cursors
  1584.   7,Blocks,
  1585.     ...                                      & exceptions may be declared;
  1586.   8,Blocks,
  1587.  BEGIN                                       DECLARE section is optional.
  1588.   9,Blocks,
  1589.     DECLARE          --First sub-block
  1590.  10,Blocks,
  1591.        variable_name2  datatype (expr)...;        --You may nest blocks in
  1592.  11,Blocks,
  1593.     BEGIN                                          each other to any level.
  1594.  12,Blocks,
  1595.        executable_statements...;
  1596.  13,Blocks,
  1597.     EXCEPTION exception_handlers;          --EXCEPTION section is optional.
  1598.  14,Blocks,
  1599.     END;
  1600.  15,Blocks,
  1601.     DECLARE          --Second sub-block
  1602.  16,Blocks,
  1603.        variable_name3  datatype (expr)...;
  1604.  17,Blocks,
  1605.     BEGIN
  1606.  18,Blocks,
  1607.        executable_statements...;
  1608.  19,Blocks,
  1609.     END;
  1610.  20,Blocks,
  1611.  EXCEPTION exception_handlers;
  1612.  21,Blocks,
  1613.  END;
  1614.  22,Blocks,
  1615.  
  1616.  23,Blocks,
  1617.  
  1618.  24,Blocks,
  1619.  See also: declare, begin, scoping rules, variables, error handling, menu.
  1620.   1,Boolean Comparisons,
  1621.  
  1622.   2,Boolean Comparisons,
  1623.  
  1624.   3,Boolean Comparisons,
  1625.                            Boolean Comparisons
  1626.   4,Boolean Comparisons,
  1627.  
  1628.   5,Boolean Comparisons,
  1629.  Boolean comparisons use comparison operators to set conditions.  These
  1630.   6,Boolean Comparisons,
  1631.  comparisons are used with flow of control statements in PL/SQL:
  1632.   7,Boolean Comparisons,
  1633.  
  1634.   8,Boolean Comparisons,
  1635.  Oper  With Numbers           With Characters        With Dates
  1636.   9,Boolean Comparisons,
  1637.  --------------------------------------------------------------------------
  1638.  10,Boolean Comparisons,
  1639.   <    is less than           alphabetically before  is earlier than
  1640.  11,Boolean Comparisons,
  1641.   >    is greater than        alphabetically after   is later than
  1642.  12,Boolean Comparisons,
  1643.   =    is equal to            is the same as         is the same as
  1644.  13,Boolean Comparisons,
  1645.   !=   is not equal to        is not the same as     is not the same as
  1646.  14,Boolean Comparisons,
  1647.   <=   less than or equal     before or same as      earlier or same as
  1648.  15,Boolean Comparisons,
  1649.   >=   greater than or equal  after or same as       later or same as
  1650.  16,Boolean Comparisons,
  1651.  
  1652.  17,Boolean Comparisons,
  1653.  
  1654.  18,Boolean Comparisons,
  1655.   You can also compare variables declared as BOOLEAN: TRUE > FALSE
  1656.  19,Boolean Comparisons,
  1657.                                                       FALSE < TRUE
  1658.  20,Boolean Comparisons,
  1659.                                                       TRUE != FALSE
  1660.  21,Boolean Comparisons,
  1661.  
  1662.  22,Boolean Comparisons,
  1663.  
  1664.  23,Boolean Comparisons,
  1665.   See also: comparison operators, conditions, boolean, menu.
  1666.   1,Buffer,
  1667.  
  1668.   2,Buffer,
  1669.  
  1670.   3,Buffer,
  1671.                                   Buffer
  1672.   4,Buffer,
  1673.  
  1674.   5,Buffer,
  1675.  SQL Commands
  1676.   6,Buffer,
  1677.      SQL commands you enter are stored in the SQL buffer.  You can continue
  1678.   7,Buffer,
  1679.      a SQL command on one or more additional lines, ending and executing
  1680.   8,Buffer,
  1681.      the command with a semicolon (;), a blank line, or a slash (/) on a
  1682.   9,Buffer,
  1683.      line by itself.  SQL*Plus displays line numbers (matching the lines in
  1684.  10,Buffer,
  1685.      the SQL buffer) for these additional lines.  Use SAVE to store the
  1686.  11,Buffer,
  1687.      buffer's contents in a file.  Use RUN or / (slash) at the command
  1688.  12,Buffer,
  1689.      prompt to execute commands in the SQL buffer.
  1690.  13,Buffer,
  1691.  
  1692.  14,Buffer,
  1693.  PL/SQL Blocks
  1694.  15,Buffer,
  1695.      SQL*Plus also stores PL/SQL programs (blocks) in the SQL buffer.
  1696.  16,Buffer,
  1697.      To end a PL/SQL block, enter a . (period) by itself on a new line.
  1698.  17,Buffer,
  1699.      Execute a block in the buffer with RUN or / (slash).  You can use
  1700.  18,Buffer,
  1701.      REMARK and /*comments*/ with PL/SQL blocks as with SQL commands.
  1702.  19,Buffer,
  1703.      In PL/SQL, you can also use "--" (two dashes) to begin a comment
  1704.  20,Buffer,
  1705.      that ends with the next RETURN character.
  1706.  21,Buffer,
  1707.  
  1708.  22,Buffer,
  1709.  SQL*Plus Commands
  1710.  23,Buffer,
  1711.      Continue a long SQL*Plus command on additional lines by using a -
  1712.  24,Buffer,
  1713.      (hyphen) at the end of each line; SQL*Plus prompts with a > for the
  1714.  25,Buffer,
  1715.      next line.  A line not ended by a hyphen executes the command.
  1716.  26,Buffer,
  1717.  
  1718.  27,Buffer,
  1719.  
  1720.  28,Buffer,
  1721.      Example: If you enter the COLUMN command:
  1722.  29,Buffer,
  1723.  
  1724.  30,Buffer,
  1725.                SQL> COLUMN ENAME HEADING EMPLOYEES -
  1726.  31,Buffer,
  1727.                   > FORMAT A10
  1728.  32,Buffer,
  1729.                SQL>
  1730.  33,Buffer,
  1731.  
  1732.  34,Buffer,
  1733.      You can end a SQL*Plus command with ; (semicolon).  It's not required.
  1734.  35,Buffer,
  1735.      SQL*Plus commands are not stored in the SQL buffer. Use EDIT to create
  1736.  36,Buffer,
  1737.      command files containing SQL*Plus commands. START runs a command file.
  1738.  37,Buffer,
  1739.      Use REMARK to enter comments within SQL*Plus commands.  You can also
  1740.  38,Buffer,
  1741.      use /*comment delimiters*/ on a separate line before or after a
  1742.  39,Buffer,
  1743.      SQL*Plus command, but not on the same line.
  1744.  40,Buffer,
  1745.  
  1746.  41,Buffer,
  1747.  
  1748.  42,Buffer,
  1749.  See also: substitution, commands, menu.
  1750.   1,CHANGE,
  1751.  
  1752.   2,CHANGE,
  1753.  
  1754.   3,CHANGE,
  1755.                                    CHANGE
  1756.   4,CHANGE,
  1757.  
  1758.   5,CHANGE,
  1759.  C[HANGE] sepchar old [sepchar [new[sepchar]]]
  1760.   6,CHANGE,
  1761.  
  1762.   7,CHANGE,
  1763.  Use CHANGE to replace the text you specify from the current line of the
  1764.   8,CHANGE,
  1765.  buffer with the new text you specify.
  1766.   9,CHANGE,
  1767.  
  1768.  10,CHANGE,
  1769.      sepchar
  1770.  11,CHANGE,
  1771.          is any non-alphanumeric character such as "/" or "!".  You can
  1772.  12,CHANGE,
  1773.          use any sepchar that does not appear in "old" or "new".  The
  1774.  13,CHANGE,
  1775.          space between CHANGE and the first sepchar is optional.
  1776.  14,CHANGE,
  1777.  
  1778.  15,CHANGE,
  1779.      old
  1780.  16,CHANGE,
  1781.          is the text you wish to change.  CHANGE ignores case in searching
  1782.  17,CHANGE,
  1783.          for old.  For example,  CHANGE /aq/aw  finds the first occurrence
  1784.  18,CHANGE,
  1785.          of "aq", "AQ", "aQ", or "Aq", and changes it to "aw".  SQL*Plus
  1786.  19,CHANGE,
  1787.          inserts the new text exactly as you specify it.
  1788.  20,CHANGE,
  1789.  
  1790.  21,CHANGE,
  1791.          If old is prefixed with "...", it matches everything up to and
  1792.  22,CHANGE,
  1793.          including the first occurrence of old.  If it is suffixed with
  1794.  23,CHANGE,
  1795.          "...", it matches the first occurrence of old and everything that
  1796.  24,CHANGE,
  1797.          follows on that line.  If it contains an embedded "...", it
  1798.  25,CHANGE,
  1799.          matches everything from the preceding part of old through the
  1800.  26,CHANGE,
  1801.          following part of old.
  1802.  27,CHANGE,
  1803.  
  1804.  28,CHANGE,
  1805.      new
  1806.  29,CHANGE,
  1807.          is the text with which you wish to replace old.  If you omit new
  1808.  30,CHANGE,
  1809.          and, optionally, the second and third sepchars, CHANGE deletes old
  1810.  31,CHANGE,
  1811.          from the current line of the buffer.
  1812.  32,CHANGE,
  1813.  
  1814.  33,CHANGE,
  1815.  CHANGE changes text on the current line in the buffer.  The current line
  1816.  34,CHANGE,
  1817.  is marked with an asterisk (*) in the LIST output.  You can also use
  1818.  35,CHANGE,
  1819.  CHANGE to modify a line in the buffer that has caused an ORACLE error;
  1820.  36,CHANGE,
  1821.  SQL*Plus makes the erroneous line, the current line.  To re-enter an
  1822.  37,CHANGE,
  1823.  entire line, type its number, then the new contents of the line. Entering
  1824.  38,CHANGE,
  1825.  a line number larger than the number of lines in the buffer causes
  1826.  39,CHANGE,
  1827.  SQL*Plus to add the text in a new line at the end of the buffer. Entering
  1828.  40,CHANGE,
  1829.  0 for the line number causes SQL*Plus insert that line before the other
  1830.  41,CHANGE,
  1831.  lines (it becomes line 1).
  1832.  42,CHANGE,
  1833.  
  1834.  43,CHANGE,
  1835.  Examples: The current line of the buffer contains the following text:
  1836.  44,CHANGE,
  1837.  
  1838.  45,CHANGE,
  1839.                4* WHERE JOB IS IN ('CLERK','ANALYST')
  1840.  46,CHANGE,
  1841.  
  1842.  47,CHANGE,
  1843.      Entering this...                  Changes the buffer text to this.
  1844.  48,CHANGE,
  1845.      -----------------------------------------------------------------------
  1846.  49,CHANGE,
  1847.      SQL> C /ANALYST/GUARD/            4* WHERE JOB IS IN ('CLERK','GUARD')
  1848.  50,CHANGE,
  1849.  
  1850.  51,CHANGE,
  1851.      SQL> C /'CLERK',.../'CLERK')/     4* WHERE JOB IS IN ('CLERK')
  1852.  52,CHANGE,
  1853.  
  1854.  53,CHANGE,
  1855.      SQL> C /(...)/('COOK','BUTLER')/  4* WHERE JOB IS IN ('COOK','BUTLER')
  1856.  54,CHANGE,
  1857.  
  1858.  55,CHANGE,
  1859.  
  1860.  56,CHANGE,
  1861.          Use the line number to replace an entire line.  If you enter:
  1862.  57,CHANGE,
  1863.  
  1864.  58,CHANGE,
  1865.                SQL> 2 FROM EMP e1
  1866.  59,CHANGE,
  1867.  
  1868.  60,CHANGE,
  1869.          the second line of the buffer is replaced with:
  1870.  61,CHANGE,
  1871.  
  1872.  62,CHANGE,
  1873.                FROM EMP e1
  1874.  63,CHANGE,
  1875.  
  1876.  64,CHANGE,
  1877.  
  1878.  65,CHANGE,
  1879.          NOTE: Entering a line number and a string always replaces the line
  1880.  66,CHANGE,
  1881.          with the string, no matter what the text of the string:
  1882.  67,CHANGE,
  1883.  
  1884.  68,CHANGE,
  1885.                SQL> 2  c/old/new/
  1886.  69,CHANGE,
  1887.  
  1888.  70,CHANGE,
  1889.          changes the second line of the buffer to:
  1890.  71,CHANGE,
  1891.  
  1892.  72,CHANGE,
  1893.                c/old/new
  1894.  73,CHANGE,
  1895.  
  1896.  74,CHANGE,
  1897.  
  1898.  75,CHANGE,
  1899.  See also: append, del, edit, input, list, save, set (SQL buffer) spool,
  1900.  76,CHANGE,
  1901.            commands, menu.
  1902.   1,CHAR,
  1903.  
  1904.   2,CHAR,
  1905.  
  1906.   3,CHAR,
  1907.                                    CHAR
  1908.   4,CHAR,
  1909.  
  1910.   5,CHAR,
  1911.  CHAR(size)               --(size) optional; if omitted, defaults to 1
  1912.   6,CHAR,
  1913.  
  1914.   7,CHAR,
  1915.  Columns and variables defined to be CHAR store characters as strings.
  1916.   8,CHAR,
  1917.  Size determines the number of characters allowed; the maximum is 255.
  1918.   9,CHAR,
  1919.  
  1920.  10,CHAR,
  1921.  
  1922.  11,CHAR,
  1923.  See also: conversion, variables, number, long, date, boolean, raw, menu.
  1924.   1,CLEAR,
  1925.  
  1926.   2,CLEAR,
  1927.  
  1928.   3,CLEAR,
  1929.                                     CLEAR
  1930.   4,CLEAR,
  1931.  
  1932.   5,CLEAR,
  1933.  CL[EAR] option
  1934.   6,CLEAR,
  1935.  
  1936.   7,CLEAR,
  1937.  CLEAR resets or erases the current value or setting for the option, where
  1938.   8,CLEAR,
  1939.  option is one of the following clauses:
  1940.   9,CLEAR,
  1941.  
  1942.  10,CLEAR,
  1943.      BRE[AKS]
  1944.  11,CLEAR,
  1945.          clears breaks set by the BREAK command.
  1946.  12,CLEAR,
  1947.  
  1948.  13,CLEAR,
  1949.      BUFF[ER]
  1950.  14,CLEAR,
  1951.          clears text from the buffer.  CLEAR BUFFER works like CLEAR SQL,
  1952.  15,CLEAR,
  1953.          unless you are using multiple buffers.
  1954.  16,CLEAR,
  1955.  
  1956.  17,CLEAR,
  1957.      COL[UMNS]
  1958.  18,CLEAR,
  1959.          clears options set by the COLUMN command for all columns. To clear
  1960.  19,CLEAR,
  1961.          settings for a single column, use the CLEAR clause of the COLUMN
  1962.  20,CLEAR,
  1963.          command.
  1964.  21,CLEAR,
  1965.  
  1966.  22,CLEAR,
  1967.      COMP[UTES]
  1968.  23,CLEAR,
  1969.          clears options set by the COMPUTE command.
  1970.  24,CLEAR,
  1971.  
  1972.  25,CLEAR,
  1973.      SCR[EEN]
  1974.  26,CLEAR,
  1975.          clears your screen.
  1976.  27,CLEAR,
  1977.  
  1978.  28,CLEAR,
  1979.      SQL
  1980.  29,CLEAR,
  1981.          clears text from the SQL buffer.  CLEAR SQL works the same as
  1982.  30,CLEAR,
  1983.          CLEAR BUFFER, unless you are using multiple buffers.
  1984.  31,CLEAR,
  1985.  
  1986.  32,CLEAR,
  1987.      TIMI[NG]
  1988.  33,CLEAR,
  1989.          deletes all timing areas created by the TIMING command.
  1990.  34,CLEAR,
  1991.  
  1992.  35,CLEAR,
  1993.  
  1994.  36,CLEAR,
  1995.  Examples: To clear breaks, enter:
  1996.  37,CLEAR,
  1997.  
  1998.  38,CLEAR,
  1999.                SQL> CLEAR BRE
  2000.  39,CLEAR,
  2001.  
  2002.  40,CLEAR,
  2003.  
  2004.  41,CLEAR,
  2005.            To clear column elements, enter:
  2006.  42,CLEAR,
  2007.  
  2008.  43,CLEAR,
  2009.                SQL> CLEAR COL
  2010.  44,CLEAR,
  2011.  
  2012.  45,CLEAR,
  2013.  
  2014.  46,CLEAR,
  2015.  See also: break, buffer, column, compute, set (SQL buffer, timing),
  2016.  47,CLEAR,
  2017.            commands, menu.
  2018.   1,CLOSE,
  2019.  
  2020.   2,CLOSE,
  2021.  
  2022.   3,CLOSE,
  2023.                                 CLOSE
  2024.   4,CLOSE,
  2025.                                                     PL/SQL statement
  2026.   5,CLOSE,
  2027.  CLOSE cursor_name;
  2028.   6,CLOSE,
  2029.  
  2030.   7,CLOSE,
  2031.  
  2032.   8,CLOSE,
  2033.  Use the CLOSE statement to disable the cursor, leaving the active
  2034.   9,CLOSE,
  2035.  set undefined.  Cursor_name must be an explicitly declared cursor
  2036.  10,CLOSE,
  2037.  that is currently open.
  2038.  11,CLOSE,
  2039.  
  2040.  12,CLOSE,
  2041.  
  2042.  13,CLOSE,
  2043.  Once it's been closed, to FETCH from a cursor you must reopen it.
  2044.  14,CLOSE,
  2045.  The system then:
  2046.  15,CLOSE,
  2047.  
  2048.  16,CLOSE,
  2049.     -  executes the OPEN statement
  2050.  17,CLOSE,
  2051.     -  reevaluates all parameters
  2052.  18,CLOSE,
  2053.     -  reinitializes the active set (rows retrieved by the query).
  2054.  19,CLOSE,
  2055.  
  2056.  20,CLOSE,
  2057.  
  2058.  21,CLOSE,
  2059.  See also: fetch, open, query, cursors, commands, menu.
  2060.   1,COLUMN,
  2061.  
  2062.   2,COLUMN,
  2063.  
  2064.   3,COLUMN,
  2065.                                    COLUMN
  2066.   4,COLUMN,
  2067.  
  2068.   5,COLUMN,
  2069.  COL[UMN] [{column | expr} [option...] ]
  2070.   6,COLUMN,
  2071.  
  2072.   7,COLUMN,
  2073.  where option is one of the following:
  2074.   8,COLUMN,
  2075.  
  2076.   9,COLUMN,
  2077.      ALI[AS] alias
  2078.  10,COLUMN,
  2079.      CLE[AR] | DEF[AULT]
  2080.  11,COLUMN,
  2081.      COLOR {color | color_variable}
  2082.  12,COLUMN,
  2083.      FOLD_A[FTER] n
  2084.  13,COLUMN,
  2085.      FOLD_B[EFORE] n
  2086.  14,COLUMN,
  2087.      FOR[MAT] format
  2088.  15,COLUMN,
  2089.      HEA[DING] text
  2090.  16,COLUMN,
  2091.      JUS[TIFY] {L[EFT] | C[ENTER] | C[ENTRE] | R[IGHT]}
  2092.  17,COLUMN,
  2093.      LIKE {expr | alias}
  2094.  18,COLUMN,
  2095.      LINEAPP {LINE | MARK | BOTH}
  2096.  19,COLUMN,
  2097.      NEWL[INE]
  2098.  20,COLUMN,
  2099.      NEW_V[ALUE] variable
  2100.  21,COLUMN,
  2101.      NOPRI[NT] | PRI[NT]
  2102.  22,COLUMN,
  2103.      NUL[L] char
  2104.  23,COLUMN,
  2105.      OLD_V[ALUE] variable
  2106.  24,COLUMN,
  2107.      ON|OFF
  2108.  25,COLUMN,
  2109.      PATTERN {pattern_number | pattern_variable}
  2110.  26,COLUMN,
  2111.      WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]
  2112.  27,COLUMN,
  2113.  
  2114.  28,COLUMN,
  2115.  COLUMN sets display attributes for a given column, such as:
  2116.  29,COLUMN,
  2117.  
  2118.  30,COLUMN,
  2119.      -   text for the column heading
  2120.  31,COLUMN,
  2121.      -   alignment of the column heading
  2122.  32,COLUMN,
  2123.      -   format for NUMBER data
  2124.  33,COLUMN,
  2125.      -   wrapping of column data
  2126.  34,COLUMN,
  2127.  
  2128.  35,COLUMN,
  2129.  Enter COLUMN with column or expr to list the current display attributes
  2130.  36,COLUMN,
  2131.  for only the column or expression specified.  Enter COLUMN with no clauses
  2132.  37,COLUMN,
  2133.  to list all current column display attributes.
  2134.  38,COLUMN,
  2135.  
  2136.  39,COLUMN,
  2137.      {column | expr}
  2138.  40,COLUMN,
  2139.          identifies the data item (typically, the column name) in a SELECT
  2140.  41,COLUMN,
  2141.          statement to which the column command refers.  You must enter an
  2142.  42,COLUMN,
  2143.          expression exactly as it appears in the SQL SELECT statement if
  2144.  43,COLUMN,
  2145.          you use it in a COLUMN command.  For example, if the expression
  2146.  44,COLUMN,
  2147.          in the SELECT statement is a+b, you cannot use b+a or (a+b) in a
  2148.  45,COLUMN,
  2149.          COLUMN command to refer to the expression in the SELECT statement.
  2150.  46,COLUMN,
  2151.  
  2152.  47,COLUMN,
  2153.          If you select columns with the same name from different tables, a
  2154.  48,COLUMN,
  2155.          COLUMN command for that column name will apply to both columns.
  2156.  49,COLUMN,
  2157.          That is, a COLUMN command for the column ENAME applies to all
  2158.  50,COLUMN,
  2159.          columns named ENAME that you reference in this session.  COLUMN
  2160.  51,COLUMN,
  2161.          ignores table name prefixes in SELECT statements.
  2162.  52,COLUMN,
  2163.  
  2164.  53,COLUMN,
  2165.          To format the columns differently, assign a unique alias to each
  2166.  54,COLUMN,
  2167.          column within the SELECT statement itself (do not use the ALIAS
  2168.  55,COLUMN,
  2169.          clause of the COLUMN command) and enter a COLUMN command for each
  2170.  56,COLUMN,
  2171.          column's alias.
  2172.  57,COLUMN,
  2173.  
  2174.  58,COLUMN,
  2175.      ALI[AS] alias
  2176.  59,COLUMN,
  2177.          assigns a specified alias to a column, which can be used to refer
  2178.  60,COLUMN,
  2179.          to the column in BREAK, COMPUTE, and other COLUMN commands.
  2180.  61,COLUMN,
  2181.  
  2182.  62,COLUMN,
  2183.      CLE[AR] | DEF[AULT]
  2184.  63,COLUMN,
  2185.          resets the display attributes for the column to default values.
  2186.  64,COLUMN,
  2187.  
  2188.  65,COLUMN,
  2189.      COLOR {color|color_variable}
  2190.  66,COLUMN,
  2191.          is described in the SQL*Graph User's Guide.
  2192.  67,COLUMN,
  2193.  
  2194.  68,COLUMN,
  2195.      FOLD_A[FTER] n
  2196.  69,COLUMN,
  2197.          inserts a carriage return after the column heading and after each
  2198.  70,COLUMN,
  2199.          row in the column.  You must enter n; the particular value you
  2200.  71,COLUMN,
  2201.          choose for n has no effect on the format.
  2202.  72,COLUMN,
  2203.  
  2204.  73,COLUMN,
  2205.      FOLD_B[EFORE] n
  2206.  74,COLUMN,
  2207.          inserts a carriage return before the column heading and before
  2208.  75,COLUMN,
  2209.          each row of the column.  You must enter n; the particular value
  2210.  76,COLUMN,
  2211.          you choose for n has no effect on the format.  FOLD_BEFORE n has
  2212.  77,COLUMN,
  2213.          the same effect as NEWLINE.
  2214.  78,COLUMN,
  2215.  
  2216.  79,COLUMN,
  2217.      FOR[MAT] format
  2218.  80,COLUMN,
  2219.          sets the display format of the column.  The format specification
  2220.  81,COLUMN,
  2221.          must be a text constant such as $9,999 or A10, not a variable.
  2222.  82,COLUMN,
  2223.  
  2224.  83,COLUMN,
  2225.          A CHAR column's width defaults to the column's width as defined in
  2226.  84,COLUMN,
  2227.          the database or to the length of the column's heading, whichever
  2228.  85,COLUMN,
  2229.          is longer.  A LONG column's width defaults to the value of SET
  2230.  86,COLUMN,
  2231.          LONG.  To change the width of a CHAR or LONG column to n, use
  2232.  87,COLUMN,
  2233.          FORMAT An.  If you specify a width shorter than the column
  2234.  88,COLUMN,
  2235.          heading, SQL*Plus truncates the heading.
  2236.  89,COLUMN,
  2237.  
  2238.  90,COLUMN,
  2239.          SQL*Plus formats CHAR data left-justified.  If a value does not
  2240.  91,COLUMN,
  2241.          fit within the column width, SQL*Plus wraps or truncates the
  2242.  92,COLUMN,
  2243.          character string depending on the setting of SET WRAP.
  2244.  93,COLUMN,
  2245.  
  2246.  94,COLUMN,
  2247.          The default width for unformatted DATE columns in SQL*Plus is A9.
  2248.  95,COLUMN,
  2249.          To change the format of a DATE column, use the SQL function
  2250.  96,COLUMN,
  2251.          TO_CHAR in your SQL SELECT statement.
  2252.  97,COLUMN,
  2253.  
  2254.  98,COLUMN,
  2255.          When you use TO_CHAR, ORACLE automatically allows for a very wide
  2256.  99,COLUMN,
  2257.          column, so SQL*Plus sets the column width to 80 characters.  Use
  2258. 100,COLUMN,
  2259.          the COLUMN command to reset the width of the column.  To change
  2260. 101,COLUMN,
  2261.          the width of a DATE column to n, use FORMAT An.  If you specify a
  2262. 102,COLUMN,
  2263.          width shorter than the column heading, the heading is truncated.
  2264. 103,COLUMN,
  2265.  
  2266. 104,COLUMN,
  2267.          NOTE: Other SQL calculations may cause a similar effect; in that
  2268. 105,COLUMN,
  2269.          case, use the SQL*Plus COLUMN command to reset the column width.
  2270. 106,COLUMN,
  2271.  
  2272. 107,COLUMN,
  2273.          A NUMBER column's width defaults to the value of SET NUMWIDTH. To
  2274. 108,COLUMN,
  2275.          change the width, use FORMAT followed by a number format element.
  2276. 109,COLUMN,
  2277.          See FORMATS FOR NUMBERS.
  2278. 110,COLUMN,
  2279.  
  2280. 111,COLUMN,
  2281.          SQL*Plus formats NUMBER data right-justified.  The field width
  2282. 112,COLUMN,
  2283.          equals the width of the heading or the format plus one space for
  2284. 113,COLUMN,
  2285.          the sign, whichever is greater.  SQL*Plus never truncates a NUMBER
  2286. 114,COLUMN,
  2287.          column heading.  If a value does not fit within the column width,
  2288. 115,COLUMN,
  2289.          SQL*Plus displays an asterisk (*) in place of each digit the width
  2290. 116,COLUMN,
  2291.          allows to indicate overflow.
  2292. 117,COLUMN,
  2293.  
  2294. 118,COLUMN,
  2295.          With all number formats, SQL*Plus rounds a number to the specified
  2296. 119,COLUMN,
  2297.          number of significant digits.  When no format is given, a number's
  2298. 120,COLUMN,
  2299.          width defaults to the value of NUMWIDTH.  See the SET command.
  2300. 121,COLUMN,
  2301.  
  2302. 122,COLUMN,
  2303.      HEA[DING] text
  2304. 123,COLUMN,
  2305.          defines a column heading.  If text contains blanks or punctuation
  2306. 124,COLUMN,
  2307.          characters, you must enclose it with single or double quotes.  If
  2308. 125,COLUMN,
  2309.          you omit a HEADING clause, the column's heading defaults to column
  2310. 126,COLUMN,
  2311.          or expr.  Each occurrence of the HEADSEP character (default = '|')
  2312. 127,COLUMN,
  2313.          begins a new line.  For example,
  2314. 128,COLUMN,
  2315.  
  2316. 129,COLUMN,
  2317.                COLUMN ENAME HEADING 'Employee |Name'
  2318. 130,COLUMN,
  2319.  
  2320. 131,COLUMN,
  2321.          produces a two-line column heading.  See the SET command's HEADSEP
  2322. 132,COLUMN,
  2323.          variable for information on changing the HEADSEP character.
  2324. 133,COLUMN,
  2325.  
  2326. 134,COLUMN,
  2327.      JUS[TIFY] {L[EFT]|C[ENTER]|C[ENTRE]|R[IGHT]}
  2328. 135,COLUMN,
  2329.          aligns the heading.  If you do not use a JUSTIFY clause, NUMBER
  2330. 136,COLUMN,
  2331.          columns default to RIGHT and other column types default to LEFT.
  2332. 137,COLUMN,
  2333.  
  2334. 138,COLUMN,
  2335.      LIKE {expr|alias}
  2336. 139,COLUMN,
  2337.          copies the display attributes of another column or expression
  2338. 140,COLUMN,
  2339.          (whose attributes you've defined with another COLUMN command).
  2340. 141,COLUMN,
  2341.          LIKE copies only attributes not defined by another clause in the
  2342. 142,COLUMN,
  2343.          current COLUMN command.
  2344. 143,COLUMN,
  2345.  
  2346. 144,COLUMN,
  2347.      LINEAPP {LINE|MARK|BOTH}
  2348. 145,COLUMN,
  2349.          is described in the SQL*Graph User's Guide.
  2350. 146,COLUMN,
  2351.  
  2352. 147,COLUMN,
  2353.      NEWL[INE]
  2354. 148,COLUMN,
  2355.          starts a new line before displaying the column's value. NEWLINE
  2356. 149,COLUMN,
  2357.          has the same effect as FOLD_BEFORE n.
  2358. 150,COLUMN,
  2359.  
  2360. 151,COLUMN,
  2361.      NEW_V[ALUE] variable
  2362. 152,COLUMN,
  2363.          specifies a variable to hold a column value, so you can reference
  2364. 153,COLUMN,
  2365.          the variable in TTITLE commands.  Use NEW_VALUE to display column
  2366. 154,COLUMN,
  2367.          values or the date in the top title.  You must include the column
  2368. 155,COLUMN,
  2369.          in a BREAK command with the SKIP PAGE action.
  2370. 156,COLUMN,
  2371.  
  2372. 157,COLUMN,
  2373.          NEW_VALUE is useful for master/detail reports in which there is a
  2374. 158,COLUMN,
  2375.          new master record for each page.  For master/detail reporting, you
  2376. 159,COLUMN,
  2377.          must also include the column in the ORDER BY clause.
  2378. 160,COLUMN,
  2379.  
  2380. 161,COLUMN,
  2381.          For information on displaying a column value in the bottom title,
  2382. 162,COLUMN,
  2383.          see COLUMN OLD_VALUE below.  See TTITLE for more information on
  2384. 163,COLUMN,
  2385.          referencing variables in titles.  See COLUMN FORMAT above for
  2386. 164,COLUMN,
  2387.          details on formatting and valid format models.
  2388. 165,COLUMN,
  2389.  
  2390. 166,COLUMN,
  2391.      NOPRI[NT]|PRI[NT]
  2392. 167,COLUMN,
  2393.          controls the printing of the column (the column heading and all
  2394. 168,COLUMN,
  2395.          the selected values).  NOPRINT turns the printing of the column
  2396. 169,COLUMN,
  2397.          off; PRINT turns it on.
  2398. 170,COLUMN,
  2399.  
  2400. 171,COLUMN,
  2401.      NUL[L] char
  2402. 172,COLUMN,
  2403.          controls the text SQL*Plus displays for null values in the given
  2404. 173,COLUMN,
  2405.          column.  If you do not use a NULL clause in the COLUMN command,
  2406. 174,COLUMN,
  2407.          SQL*Plus displays blanks or the text to which you have set NULL
  2408. 175,COLUMN,
  2409.          using the SET command whenever a null value is encountered in the
  2410. 176,COLUMN,
  2411.          given column.  (SET NULL controls the text displayed for all null
  2412. 177,COLUMN,
  2413.          values for all columns, unless overridden for a specific column by
  2414. 178,COLUMN,
  2415.          the NULL clause of the COLUMN command.)
  2416. 179,COLUMN,
  2417.  
  2418. 180,COLUMN,
  2419.      OLD_V[ALUE] variable
  2420. 181,COLUMN,
  2421.          specifies a variable to hold a column value, so you can reference
  2422. 182,COLUMN,
  2423.          the variable in BTITLE commands.  Use OLD_VALUE to display column
  2424. 183,COLUMN,
  2425.          values or the date in the bottom title.  You must include the
  2426. 184,COLUMN,
  2427.          column in a BREAK command with the SKIP PAGE action.
  2428. 185,COLUMN,
  2429.  
  2430. 186,COLUMN,
  2431.          OLD_VALUE is useful for master/detail reports in which there is a
  2432. 187,COLUMN,
  2433.          new master record for each page.  For master/detail reporting, you
  2434. 188,COLUMN,
  2435.          must also include the column in the ORDER BY clause.
  2436. 189,COLUMN,
  2437.  
  2438. 190,COLUMN,
  2439.          See COLUMN NEW_VALUE above for information on displaying a column
  2440. 191,COLUMN,
  2441.          value in the top title.  See TTITLE for more on referencing
  2442. 192,COLUMN,
  2443.          variables in titles.  See COLUMN FORMAT above for details on
  2444. 193,COLUMN,
  2445.          formatting and valid format models.
  2446. 194,COLUMN,
  2447.  
  2448. 195,COLUMN,
  2449.      ON|OFF
  2450. 196,COLUMN,
  2451.          controls the status of display attributes for a column.  OFF
  2452. 197,COLUMN,
  2453.          disables the attributes for a column without affecting the
  2454. 198,COLUMN,
  2455.          attributes' definition.  ON reinstates the attributes.
  2456. 199,COLUMN,
  2457.  
  2458. 200,COLUMN,
  2459.      PATTERN {pattern_number|pattern_variable}
  2460. 201,COLUMN,
  2461.          is described in the SQL*Graph User's Guide.
  2462. 202,COLUMN,
  2463.  
  2464. 203,COLUMN,
  2465.      WRA[PPED]| WOR[D_WRAPPED]|TRU[NCATED]
  2466. 204,COLUMN,
  2467.          specifies how SQL*Plus treats a CHAR string that is too wide for a
  2468. 205,COLUMN,
  2469.          column.  WRAPPED moves the end of the string to the next line.
  2470. 206,COLUMN,
  2471.          WORD_WRAP moves an entire word to the next line rather than
  2472. 207,COLUMN,
  2473.          splitting the word.  TRUNCATED cuts off the string at the end of
  2474. 208,COLUMN,
  2475.          the first display line.
  2476. 209,COLUMN,
  2477.  
  2478. 210,COLUMN,
  2479.  
  2480. 211,COLUMN,
  2481.  You can enter any number of COLUMN commands for one or more columns.  All
  2482. 212,COLUMN,
  2483.  column attributes set for each column remain in effect for the remainder
  2484. 213,COLUMN,
  2485.  of the session, or until you turn the column OFF.  Thus, the COLUMN
  2486. 214,COLUMN,
  2487.  commands you enter can control a column's display attributes for multiple
  2488. 215,COLUMN,
  2489.  SQL SELECT statements.   When you enter multiple COLUMN commands for the
  2490. 216,COLUMN,
  2491.  same column, SQL*Plus applies their clauses collectively.  If several
  2492. 217,COLUMN,
  2493.  COLUMN commands apply the same clause to the same column, the last one
  2494. 218,COLUMN,
  2495.  entered will control the output.
  2496. 219,COLUMN,
  2497.  
  2498. 220,COLUMN,
  2499.  Examples: To make the ENAME column 20 characters wide and display EMPLOYEE
  2500. 221,COLUMN,
  2501.            NAME on two lines at the top, enter:
  2502. 222,COLUMN,
  2503.  
  2504. 223,COLUMN,
  2505.                SQL> COLUMN ENAME FORMAT A20 HEADING 'EMPLOYEE |NAME'
  2506. 224,COLUMN,
  2507.  
  2508. 225,COLUMN,
  2509.  
  2510. 226,COLUMN,
  2511.            To format the SAL column so that it shows millions of dollars,
  2512. 227,COLUMN,
  2513.            rounds to cents, uses commas to separate thousands, and displays
  2514. 228,COLUMN,
  2515.            $0.00 when a value is zero:
  2516. 229,COLUMN,
  2517.  
  2518. 230,COLUMN,
  2519.                SQL> COLUMN SAL FORMAT $9,999,990.99
  2520. 231,COLUMN,
  2521.  
  2522. 232,COLUMN,
  2523.  
  2524. 233,COLUMN,
  2525.            To assign the alias NET to a column with a long expression,
  2526. 234,COLUMN,
  2527.            display the result in a dollar format, and display <NULL> for
  2528. 235,COLUMN,
  2529.            null values, enter:
  2530. 236,COLUMN,
  2531.  
  2532. 237,COLUMN,
  2533.                SQL> COLUMN SAL+COMM+BONUS-EXPENSES-INS-TAX ALIAS NET
  2534. 238,COLUMN,
  2535.                SQL> COLUMN NET FORMAT $9,999,999.99 NULL '<NULL>'
  2536. 239,COLUMN,
  2537.  
  2538. 240,COLUMN,
  2539.  
  2540. 241,COLUMN,
  2541.            This column specification is divided into two commands.  The
  2542. 242,COLUMN,
  2543.            first defines the alias NET, and the second uses NET to define
  2544. 243,COLUMN,
  2545.            the format.  In the first command, you must enter the expression
  2546. 244,COLUMN,
  2547.            exactly as in the SELECT statement.  Otherwise, SQL*Plus cannot
  2548. 245,COLUMN,
  2549.            match the COLUMN command to the appropriate column.  To wrap
  2550. 246,COLUMN,
  2551.            long values in a column named REMARKS, enter:
  2552. 247,COLUMN,
  2553.  
  2554. 248,COLUMN,
  2555.                SQL> COLUMN REMARKS FORMAT A20 WRAP
  2556. 249,COLUMN,
  2557.  
  2558. 250,COLUMN,
  2559.            Output:
  2560. 251,COLUMN,
  2561.  
  2562. 252,COLUMN,
  2563.                CUSTOMER  DATE       QUANTITY   REMARKS
  2564. 253,COLUMN,
  2565.                --------  ---------  --------   --------------------
  2566. 254,COLUMN,
  2567.                123       25-AUG-89       144   This order must be s
  2568. 255,COLUMN,
  2569.                                                hipped by air freigh
  2570. 256,COLUMN,
  2571.                                                t to ORD.
  2572. 257,COLUMN,
  2573.  
  2574. 258,COLUMN,
  2575.            If you replace WRAP with WORD_WRAP:
  2576. 259,COLUMN,
  2577.  
  2578. 260,COLUMN,
  2579.                CUSTOMER  DATE       QUANTITY   REMARKS
  2580. 261,COLUMN,
  2581.                --------  ---------  --------   --------------------
  2582. 262,COLUMN,
  2583.                123       25-AUG-89       144   This order must be
  2584. 263,COLUMN,
  2585.                                                shipped by air
  2586. 264,COLUMN,
  2587.                                                freight to ORD.
  2588. 265,COLUMN,
  2589.  
  2590. 266,COLUMN,
  2591.            If you specify TRUNCATE instead of WORD_WRAP:
  2592. 267,COLUMN,
  2593.  
  2594. 268,COLUMN,
  2595.                CUSTOMER  DATE       QUANTITY   REMARKS
  2596. 269,COLUMN,
  2597.                --------  ---------  --------   --------------------
  2598. 270,COLUMN,
  2599.                123       25-AUG-89       144   This order must be s
  2600. 271,COLUMN,
  2601.  
  2602. 272,COLUMN,
  2603.  
  2604. 273,COLUMN,
  2605.            To print the current date and the name of each job in the top
  2606. 274,COLUMN,
  2607.            title:
  2608. 275,COLUMN,
  2609.  
  2610. 276,COLUMN,
  2611.                SQL> COLUMN JOB NOPRINT NEW_VALUE JOBVAR
  2612. 277,COLUMN,
  2613.                SQL> COLUMN TODAY NOPRINT NEW_VALUE DATEVAR
  2614. 278,COLUMN,
  2615.                SQL> BREAK ON JOB SKIP PAGE
  2616. 279,COLUMN,
  2617.                SQL> TTITLE CENTER 'Job Report' RIGHT DATEVAR  SKIP 2 -
  2618. 280,COLUMN,
  2619.                   > LEFT 'Job:     ' JOBVAR SKIP 2
  2620. 281,COLUMN,
  2621.                SQL> SELECT TO_CHAR(SYSDATE, 'MM/DD/YY') TODAY,
  2622. 282,COLUMN,
  2623.                  2  ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO
  2624. 283,COLUMN,
  2625.                  3  FROM EMP WHERE JOB IN ('CLERK', 'SALESMAN')
  2626. 284,COLUMN,
  2627.                  4  ORDER BY JOB, ENAME;
  2628. 285,COLUMN,
  2629.  
  2630. 286,COLUMN,
  2631.            Your 2-page report would look like this, with "Job Report"
  2632. 287,COLUMN,
  2633.            centered in your current line size:
  2634. 288,COLUMN,
  2635.  
  2636. 289,COLUMN,
  2637.                                           Job Report             05/01/89
  2638. 290,COLUMN,
  2639.  
  2640. 291,COLUMN,
  2641.            Job:     CLERK
  2642. 292,COLUMN,
  2643.  
  2644. 293,COLUMN,
  2645.            ENAME            MGR HIREDATE          SAL     DEPTNO
  2646. 294,COLUMN,
  2647.            ---------- --------- --------- ----------- ----------
  2648. 295,COLUMN,
  2649.            ADAMS           7788 14-JAN-87        1100         20
  2650. 296,COLUMN,
  2651.            JAMES           7698 03-DEC-88         950         30
  2652. 297,COLUMN,
  2653.            MILLER          7782 23-JAN-89        1300         10
  2654. 298,COLUMN,
  2655.            SMITH           7902 17-DEC-88         800         20
  2656. 299,COLUMN,
  2657.  
  2658. 300,COLUMN,
  2659.                                           Job Report             05/01/89
  2660. 301,COLUMN,
  2661.  
  2662. 302,COLUMN,
  2663.            Job:     SALESMAN
  2664. 303,COLUMN,
  2665.  
  2666. 304,COLUMN,
  2667.            ENAME            MGR HIREDATE          SAL     DEPTNO
  2668. 305,COLUMN,
  2669.            ---------- --------- --------- ----------- ----------
  2670. 306,COLUMN,
  2671.            ALLEN           7698 20-FEB-88        1600         30
  2672. 307,COLUMN,
  2673.            MARTIN          7698 28-SEP-86        1250         30
  2674. 308,COLUMN,
  2675.            TURNER          7698 08-SEP-83        1500         30
  2676. 309,COLUMN,
  2677.            WARD            7698 22-FEB-89        1250         30
  2678. 310,COLUMN,
  2679.  
  2680. 311,COLUMN,
  2681.  
  2682. 312,COLUMN,
  2683.  See also: break, compute, clear, order by set (long, numwidth, wrap),
  2684. 313,COLUMN,
  2685.            ttitle, commands, menu.
  2686.   1,COMMENT,
  2687.  
  2688.   2,COMMENT,
  2689.  
  2690.   3,COMMENT,
  2691.                                    COMMENT
  2692.   4,COMMENT,
  2693.                                                               SQL statement
  2694.   5,COMMENT,
  2695.  COMMENT ON TABLE user.table
  2696.   6,COMMENT,
  2697.      IS 'text'
  2698.   7,COMMENT,
  2699.  
  2700.   8,COMMENT,
  2701.  COMMENT ON COLUMN user.table.column
  2702.   9,COMMENT,
  2703.      IS 'text'
  2704.  10,COMMENT,
  2705.  
  2706.  11,COMMENT,
  2707.  Use COMMENT to insert a comment about a table or column into the data
  2708.  12,COMMENT,
  2709.  dictionary.  To see the comment, select the REMARKS column from the data
  2710.  13,COMMENT,
  2711.  dictionary view ALL_COL_COMMENTS, ALL_TAB_COMMENTS, USER_COL_COMMENTS, or
  2712.  14,COMMENT,
  2713.  USER_TAB_COMMENTS.
  2714.  15,COMMENT,
  2715.  
  2716.  16,COMMENT,
  2717.  To drop a comment from the database, use two apostrophes (an empty string)
  2718.  17,COMMENT,
  2719.  after IS.
  2720.  18,COMMENT,
  2721.  
  2722.  19,COMMENT,
  2723.  
  2724.  20,COMMENT,
  2725.  
  2726.  21,COMMENT,
  2727.  See also: comments (in sql statements), data dictionary, commands, menu.
  2728.   1,COMMIT,
  2729.  
  2730.   2,COMMIT,
  2731.  
  2732.   3,COMMIT,
  2733.                                 COMMIT
  2734.   4,COMMIT,
  2735.                                                        SQL statement
  2736.   5,COMMIT,
  2737.  COMMIT;
  2738.   6,COMMIT,
  2739.  COMMIT WORK;
  2740.   7,COMMIT,
  2741.  
  2742.   8,COMMIT,
  2743.  The COMMIT statement makes permanent any database changes made since
  2744.   9,COMMIT,
  2745.  the last COMMIT, and reveals the changes to other users.
  2746.  10,COMMIT,
  2747.  
  2748.  11,COMMIT,
  2749.  All row and table locks are released.  All savepoints declared since
  2750.  12,COMMIT,
  2751.  the last COMMIT or ROLLBACK are erased.
  2752.  13,COMMIT,
  2753.  
  2754.  14,COMMIT,
  2755.  Until you COMMIT changes, you can use the ROLLBACK statement to undo
  2756.  15,COMMIT,
  2757.  them. All changes since your last commit are erased; the database is
  2758.  16,COMMIT,
  2759.  the way it was just after the last COMMIT.
  2760.  17,COMMIT,
  2761.  
  2762.  18,COMMIT,
  2763.  Use COMMIT WORK for ANSI compatibility.
  2764.  19,COMMIT,
  2765.  
  2766.  20,COMMIT,
  2767.  
  2768.  21,COMMIT,
  2769.  
  2770.  22,COMMIT,
  2771.  See also: example, rollback, savepoint, transactions, set transaction,
  2772.  23,COMMIT,
  2773.            bnf syntax, commands, menu.
  2774.   1,COMPUTE,
  2775.  
  2776.   2,COMPUTE,
  2777.  
  2778.   3,COMPUTE,
  2779.                                   COMPUTE
  2780.   4,COMPUTE,
  2781.  
  2782.   5,COMPUTE,
  2783.  COMP[UTE] [function ...
  2784.   6,COMPUTE,
  2785.      OF { quoted_select_expr | column | alias}...
  2786.   7,COMPUTE,
  2787.      ON { quoted_select_expr | column | alias | REPORT| ROW}]
  2788.   8,COMPUTE,
  2789.  
  2790.   9,COMPUTE,
  2791.  COMPUTE calculates and prints summary lines, using various standard
  2792.  10,COMPUTE,
  2793.  computations, on subsets of selected rows.  It also lists all COMPUTE
  2794.  11,COMPUTE,
  2795.  definitions.
  2796.  12,COMPUTE,
  2797.  
  2798.  13,COMPUTE,
  2799.          Function     Computes
  2800.  14,COMPUTE,
  2801.          --------------------------------------------------
  2802.  15,COMPUTE,
  2803.          AVG          Average of non-null values
  2804.  16,COMPUTE,
  2805.          COU[NT]      Count of non-null values
  2806.  17,COMPUTE,
  2807.          MAX[IMUM]    Maximum value
  2808.  18,COMPUTE,
  2809.          MIN[IMUM]    Minimum value
  2810.  19,COMPUTE,
  2811.          NUM[BER]     Count of rows
  2812.  20,COMPUTE,
  2813.          STD          Standard deviation of non-null values
  2814.  21,COMPUTE,
  2815.          SUM          Sum of non-null values
  2816.  22,COMPUTE,
  2817.          VAR[IANCE]   Variance of non-null values
  2818.  23,COMPUTE,
  2819.  
  2820.  24,COMPUTE,
  2821.          If you specify more than one function, use spaces between them.
  2822.  25,COMPUTE,
  2823.  
  2824.  26,COMPUTE,
  2825.      OF { quoted_select_expr | column | alias }...
  2826.  27,COMPUTE,
  2827.           specifies the column(s) or expression(s) to be used in the
  2828.  28,COMPUTE,
  2829.           computation.  You must also specify these columns in the SELECT
  2830.  29,COMPUTE,
  2831.           statement, or SQL*Plus will ignore the COMPUTE command.
  2832.  30,COMPUTE,
  2833.  
  2834.  31,COMPUTE,
  2835.           If you don't want the computed values of a given column to appear
  2836.  32,COMPUTE,
  2837.           in the output of a SELECT statement, use the COLUMN command with
  2838.  33,COMPUTE,
  2839.           a NOPRINT clause.  Use spaces between multiple expressions,
  2840.  34,COMPUTE,
  2841.           columns, or aliases within the OF clause.
  2842.  35,COMPUTE,
  2843.  
  2844.  36,COMPUTE,
  2845.           To reference a SELECT expression or function reference in an OF
  2846.  37,COMPUTE,
  2847.           clause, place the expression or function reference in "quotes".
  2848.  38,COMPUTE,
  2849.           Column names and aliases do not need quotes.
  2850.  39,COMPUTE,
  2851.  
  2852.  40,COMPUTE,
  2853.      ON { quoted_select_expr | column | alias | REPORT | ROW }]
  2854.  41,COMPUTE,
  2855.           specifies the event SQL*Plus will use as a break.  COMPUTE prints
  2856.  42,COMPUTE,
  2857.           the computed value and restarts the computation when the event
  2858.  43,COMPUTE,
  2859.           occurs (i.e., when the value of the expression changes, a new ROW
  2860.  44,COMPUTE,
  2861.           is fetched, or the end of the report is reached).
  2862.  45,COMPUTE,
  2863.  
  2864.  46,COMPUTE,
  2865.           If multiple COMPUTE commands reference the same column in the ON
  2866.  47,COMPUTE,
  2867.           clause, only the last COMPUTE command applies.
  2868.  48,COMPUTE,
  2869.  
  2870.  49,COMPUTE,
  2871.           To reference a SQL SELECT expression or function reference in
  2872.  50,COMPUTE,
  2873.           an ON clause, put the expression or function reference in quotes.
  2874.  51,COMPUTE,
  2875.           Column names and aliases do not need quotes.  Enter COMPUTE
  2876.  52,COMPUTE,
  2877.           without clauses to list all COMPUTE definitions.
  2878.  53,COMPUTE,
  2879.  
  2880.  54,COMPUTE,
  2881.  
  2882.  55,COMPUTE,
  2883.  For SQL*Plus to perform the computations:
  2884.  56,COMPUTE,
  2885.  
  2886.  57,COMPUTE,
  2887.      -  The expression, column, or column alias referenced in the ON clause
  2888.  58,COMPUTE,
  2889.         must be in the SELECT statement.
  2890.  59,COMPUTE,
  2891.  
  2892.  60,COMPUTE,
  2893.      -  The expression, column, or column alias referenced in the ON clause
  2894.  61,COMPUTE,
  2895.         must also be in the most recent BREAK command.
  2896.  62,COMPUTE,
  2897.  
  2898.  63,COMPUTE,
  2899.      -  If you reference either ROW or REPORT in the ON clause, you must
  2900.  64,COMPUTE,
  2901.         also reference ROW or REPORT in the most recent BREAK command.
  2902.  65,COMPUTE,
  2903.  
  2904.  66,COMPUTE,
  2905.      -  One or more of the expressions, columns, or column aliases
  2906.  67,COMPUTE,
  2907.         referenced in the OF clause must also be in the SELECT statement.
  2908.  68,COMPUTE,
  2909.  
  2910.  69,COMPUTE,
  2911.  
  2912.  70,COMPUTE,
  2913.  Examples: To subtotal the salary for the clerk, analyst, and salesman
  2914.  71,COMPUTE,
  2915.            jobs, enter:
  2916.  72,COMPUTE,
  2917.  
  2918.  73,COMPUTE,
  2919.                SQL> BREAK ON JOB SKIP 1
  2920.  74,COMPUTE,
  2921.                SQL> COMPUTE SUM OF SAL ON JOB
  2922.  75,COMPUTE,
  2923.                SQL> SELECT JOB, ENAME, SAL
  2924.  76,COMPUTE,
  2925.                   2  FROM EMP
  2926.  77,COMPUTE,
  2927.                   3  WHERE JOB IN ('CLERK', 'ANALYST', 'SALESMAN')
  2928.  78,COMPUTE,
  2929.                   4  ORDER BY JOB, SAL;
  2930.  79,COMPUTE,
  2931.  
  2932.  80,COMPUTE,
  2933.            Output:
  2934.  81,COMPUTE,
  2935.  
  2936.  82,COMPUTE,
  2937.                JOB       ENAME             SAL
  2938.  83,COMPUTE,
  2939.                --------- ---------- ----------
  2940.  84,COMPUTE,
  2941.                ANALYST   SCOTT            3000
  2942.  85,COMPUTE,
  2943.                          FORD             3000
  2944.  86,COMPUTE,
  2945.                *********            ----------
  2946.  87,COMPUTE,
  2947.                sum                        6000
  2948.  88,COMPUTE,
  2949.  
  2950.  89,COMPUTE,
  2951.                CLERK     SMITH             800
  2952.  90,COMPUTE,
  2953.                          JAMES             950
  2954.  91,COMPUTE,
  2955.                          ADAMS            1100
  2956.  92,COMPUTE,
  2957.                          MILLER           1300
  2958.  93,COMPUTE,
  2959.                *********            ----------
  2960.  94,COMPUTE,
  2961.                sum                        4150
  2962.  95,COMPUTE,
  2963.  
  2964.  96,COMPUTE,
  2965.                SALESMAN  WARD             1250
  2966.  97,COMPUTE,
  2967.                          MARTIN           1250
  2968.  98,COMPUTE,
  2969.                          TURNER           1500
  2970.  99,COMPUTE,
  2971.                          ALLEN            1600
  2972. 100,COMPUTE,
  2973.                          WILSON           3000
  2974. 101,COMPUTE,
  2975.                *********            ----------
  2976. 102,COMPUTE,
  2977.                sum                        8600
  2978. 103,COMPUTE,
  2979.  
  2980. 104,COMPUTE,
  2981.  
  2982. 105,COMPUTE,
  2983.            To compute the average and maximum salary for the accounting and
  2984. 106,COMPUTE,
  2985.            sales departments, enter:
  2986. 107,COMPUTE,
  2987.  
  2988. 108,COMPUTE,
  2989.  
  2990. 109,COMPUTE,
  2991.                SQL> BREAK ON DNAME SKIP 1
  2992. 110,COMPUTE,
  2993.                SQL> COMPUTE AVG MAX OF SAL ON DNAME
  2994. 111,COMPUTE,
  2995.                SQL> SELECT DNAME, ENAME, SAL
  2996. 112,COMPUTE,
  2997.                  2  FROM DEPT, EMP
  2998. 113,COMPUTE,
  2999.                  3  WHERE DEPT.DEPTNO=EMP.DEPTNO
  3000. 114,COMPUTE,
  3001.                  4  AND DNAME IN ('ACCOUNTING', 'SALES')
  3002. 115,COMPUTE,
  3003.                  5  ORDER BY DNAME;
  3004. 116,COMPUTE,
  3005.  
  3006. 117,COMPUTE,
  3007.            Output:
  3008. 118,COMPUTE,
  3009.  
  3010. 119,COMPUTE,
  3011.                DNAME          ENAME             SAL
  3012. 120,COMPUTE,
  3013.                -------------- ---------- ----------
  3014. 121,COMPUTE,
  3015.                ACCOUNTING     CLARK            2450
  3016. 122,COMPUTE,
  3017.                               KING             5000
  3018. 123,COMPUTE,
  3019.                               MILLER           1300
  3020. 124,COMPUTE,
  3021.                **************            ----------
  3022. 125,COMPUTE,
  3023.                avg                       2916.66667
  3024. 126,COMPUTE,
  3025.                maximum                         5000
  3026. 127,COMPUTE,
  3027.  
  3028. 128,COMPUTE,
  3029.                SALES          ALLEN            1600
  3030. 129,COMPUTE,
  3031.                               WARD             1250
  3032. 130,COMPUTE,
  3033.                               MARTIN           1250
  3034. 131,COMPUTE,
  3035.                               TURNER           1500
  3036. 132,COMPUTE,
  3037.                               JAMES             950
  3038. 133,COMPUTE,
  3039.                               BLAKE            2850
  3040. 134,COMPUTE,
  3041.                **************            ----------
  3042. 135,COMPUTE,
  3043.                avg                       1566.66667
  3044. 136,COMPUTE,
  3045.                maximum                         2850
  3046. 137,COMPUTE,
  3047.  
  3048. 138,COMPUTE,
  3049.  
  3050. 139,COMPUTE,
  3051.  See also: column, break, select, commands, menu.
  3052.   1,CONNECT,
  3053.  
  3054.   2,CONNECT,
  3055.  
  3056.   3,CONNECT,
  3057.                                    CONNECT
  3058.   4,CONNECT,
  3059.  
  3060.   5,CONNECT,
  3061.  CONN[ECT]  username [ /password ] [ @database_specification ] | /
  3062.   6,CONNECT,
  3063.  
  3064.   7,CONNECT,
  3065.  CONNECT establishes a connection to an ORACLE database.
  3066.   8,CONNECT,
  3067.  
  3068.   9,CONNECT,
  3069.      username [/password]
  3070.  10,CONNECT,
  3071.          are the username and password connecting to ORACLE.  If you omit
  3072.  11,CONNECT,
  3073.          the username or password, SQL*Plus prompts you for them.  If you
  3074.  12,CONNECT,
  3075.          enter a slash (/) or enter RETURN to the prompt for username,
  3076.  13,CONNECT,
  3077.          SQL*Plus logs you on with a default logon.
  3078.  14,CONNECT,
  3079.  
  3080.  15,CONNECT,
  3081.      @database_specification
  3082.  16,CONNECT,
  3083.          is a SQL*Net connection string.  The syntax depends on the SQL*Net
  3084.  17,CONNECT,
  3085.          communications protocol of your ORACLE installation.  SQL*Plus
  3086.  18,CONNECT,
  3087.          does not prompt you for a database_specification, but uses your
  3088.  19,CONNECT,
  3089.          default database if you omit a specification.
  3090.  20,CONNECT,
  3091.  
  3092.  21,CONNECT,
  3093.      /   is a default (ops$) logon.  You can't use a database_specification
  3094.  22,CONNECT,
  3095.          if you use a default logon.  In a default logon, SQL*Plus tries to
  3096.  23,CONNECT,
  3097.          log on with OPS$ name; name is the operating system username.
  3098.  24,CONNECT,
  3099.  
  3100.  25,CONNECT,
  3101.  CONNECT commits the current transaction to the database, disconnects the
  3102.  26,CONNECT,
  3103.  current username from ORACLE, and reconnects with the specified username.
  3104.  27,CONNECT,
  3105.  
  3106.  28,CONNECT,
  3107.  
  3108.  29,CONNECT,
  3109.  Examples: To connect with username SCOTT and password TIGER to the default
  3110.  30,CONNECT,
  3111.            database on the DECnet node "corp", enter:
  3112.  31,CONNECT,
  3113.  
  3114.  32,CONNECT,
  3115.                SQL> CONNECT SCOTT/TIGER@d:corp
  3116.  33,CONNECT,
  3117.  
  3118.  34,CONNECT,
  3119.            To connect with username SCOTT and let SQL*Plus prompt you for
  3120.  35,CONNECT,
  3121.            the password, enter:
  3122.  36,CONNECT,
  3123.  
  3124.  37,CONNECT,
  3125.                SQL> CONNECT SCOTT
  3126.  38,CONNECT,
  3127.  
  3128.  39,CONNECT,
  3129.  
  3130.  40,CONNECT,
  3131.  See also: disconnect, exit, host, quit, commands, menu.
  3132.   1,CONNECT BY,
  3133.  
  3134.   2,CONNECT BY,
  3135.  
  3136.   3,CONNECT BY,
  3137.                              CONNECT BY
  3138.   4,CONNECT BY,
  3139.                                                          SQL clauses
  3140.   5,CONNECT BY,
  3141.  SELECT list  FROM...
  3142.   6,CONNECT BY,
  3143.     WHERE...
  3144.   7,CONNECT BY,
  3145.     CONNECT BY PRIOR expr1 operator expr2     --displays expr1 first
  3146.   8,CONNECT BY,
  3147.     CONNECT BY expr1 operator PRIOR expr2     --displays expr2 first
  3148.   9,CONNECT BY,
  3149.     START WITH condition;                     --not required
  3150.  10,CONNECT BY,
  3151.  
  3152.  11,CONNECT BY,
  3153.  The CONNECT BY clause connects rows in a tree-structured hierarchy,
  3154.  12,CONNECT BY,
  3155.  defined by PRIOR.  Put PRIOR in front of the parent expression:
  3156.  13,CONNECT BY,
  3157.  
  3158.  14,CONNECT BY,
  3159.     CONNECT BY PRIOR EMPNO = MGR
  3160.  15,CONNECT BY,
  3161.  
  3162.  16,CONNECT BY,
  3163.  CONNECT BY cannot be used in subquery or join operations.
  3164.  17,CONNECT BY,
  3165.  
  3166.  18,CONNECT BY,
  3167.  
  3168.  19,CONNECT BY,
  3169.  See also: example connect by, conditions, tree-structured query,
  3170.  20,CONNECT BY,
  3171.            start with, where, commands, menu.
  3172.   1,COPY,
  3173.  
  3174.   2,COPY,
  3175.  
  3176.   3,COPY,
  3177.                                  COPY
  3178.   4,COPY,
  3179.  
  3180.   5,COPY,
  3181.  COPY [FROM username [ /password ] [ @database_specification ] |
  3182.   6,COPY,
  3183.        TO   username [ /password ] [ @database_specification ] ]
  3184.   7,COPY,
  3185.        {APPEND|CREATE|INSERT|REPLACE}  destination_table
  3186.   8,COPY,
  3187.        [(column, column, column  ...)] USING query
  3188.   9,COPY,
  3189.  
  3190.  10,COPY,
  3191.        COPY copies data from a query to a table in a local or remote database.
  3192.  11,COPY,
  3193.  
  3194.  12,COPY,
  3195.      username [ /password ]
  3196.  13,COPY,
  3197.          are the ORACLE username/password  you wish to COPY FROM and TO.
  3198.  14,COPY,
  3199.          In the FROM clause, username/password identifies the data source;
  3200.  15,COPY,
  3201.          in the TO clause, username/password identifies the destination.
  3202.  16,COPY,
  3203.          If you do not specify password in either the FROM or TO clause,
  3204.  17,COPY,
  3205.          SQL*Plus prompts you for it.
  3206.  18,COPY,
  3207.  
  3208.  19,COPY,
  3209.      @database_specification
  3210.  20,COPY,
  3211.          is a database link name or a SQL*Net connection string.  In the
  3212.  21,COPY,
  3213.          FROM clause, database_specification is the database at the source;
  3214.  22,COPY,
  3215.          in the TO clause, database_specification is the database at the
  3216.  23,COPY,
  3217.          destination.  The syntax depends upon the SQL*Net communications
  3218.  24,COPY,
  3219.          protocol of your ORACLE installation.  SQL*Plus does not prompt
  3220.  25,COPY,
  3221.          you for a database specification, but uses your default database
  3222.  26,COPY,
  3223.          if you omit a specification.
  3224.  27,COPY,
  3225.  
  3226.  28,COPY,
  3227.      destination_table
  3228.  29,COPY,
  3229.          is the table to be created or to which you wish to add data.
  3230.  30,COPY,
  3231.  
  3232.  31,COPY,
  3233.      (column, column, column,  ... )
  3234.  32,COPY,
  3235.          specifies the names of the columns in destination_table.  You must
  3236.  33,COPY,
  3237.          enclose a name in "double quotes" if it contains lowercase letters
  3238.  34,COPY,
  3239.          or spaces.  The number of columns you specify must equal the
  3240.  35,COPY,
  3241.          number of columns selected by the query.  If you don't specify any
  3242.  36,COPY,
  3243.          columns, they will have the same names in the destination table as
  3244.  37,COPY,
  3245.          they had in the source, if COPY creates destination_table.
  3246.  38,COPY,
  3247.  
  3248.  39,COPY,
  3249.      USING query
  3250.  40,COPY,
  3251.           specifies a SQL query (SELECT statement) to determine which rows
  3252.  41,COPY,
  3253.           and columns to copy.
  3254.  42,COPY,
  3255.  
  3256.  43,COPY,
  3257.      FROM username [ /password ] [ @database_specification ]
  3258.  44,COPY,
  3259.           specifies the username, password, and database with the data to be
  3260.  45,COPY,
  3261.           copied.  If the FROM clause is omitted, the source defaults to the
  3262.  46,COPY,
  3263.           database SQL*Plus is connected to.  You must include this clause
  3264.  47,COPY,
  3265.           to specify a source database other than the default.
  3266.  48,COPY,
  3267.  
  3268.  49,COPY,
  3269.      TO username [ /password ] [ @database_specification ]
  3270.  50,COPY,
  3271.           specifies the database containing the destination table.  If you
  3272.  51,COPY,
  3273.           omit the TO clause, the destination defaults to the database
  3274.  52,COPY,
  3275.           SQL*Plus is connected to.  You must include this clause to specify
  3276.  53,COPY,
  3277.           a destination database other than the default.
  3278.  54,COPY,
  3279.  
  3280.  55,COPY,
  3281.      APPEND
  3282.  56,COPY,
  3283.          inserts the rows from query into destination_table if the table
  3284.  57,COPY,
  3285.          exists.  If destination_table does not exist, COPY creates it.
  3286.  58,COPY,
  3287.  
  3288.  59,COPY,
  3289.      CREATE
  3290.  60,COPY,
  3291.          inserts the rows from query into destination_table after creating
  3292.  61,COPY,
  3293.          the table.  If destination_table exists, COPY returns an error.
  3294.  62,COPY,
  3295.  
  3296.  63,COPY,
  3297.      INSERT
  3298.  64,COPY,
  3299.          inserts the rows from query into destination_table if the table
  3300.  65,COPY,
  3301.          exists. If destination_table doesn't exist, COPY returns an error.
  3302.  66,COPY,
  3303.  
  3304.  67,COPY,
  3305.      REPLACE
  3306.  68,COPY,
  3307.          deletes existing rows from destination_table, and inserts the rows
  3308.  69,COPY,
  3309.          from query into destination_table, if the table exists.  If the
  3310.  70,COPY,
  3311.          table does not exist, COPY creates it.
  3312.  71,COPY,
  3313.  
  3314.  72,COPY,
  3315.  
  3316.  73,COPY,
  3317.  The SQL*Plus SET system_variable LONG clause limits the length of LONG
  3318.  74,COPY,
  3319.  columns that are copied.  If any LONG columns have data longer than the
  3320.  75,COPY,
  3321.  LONG value, COPY truncates the data.  SQL*Plus performs a commit at the
  3322.  76,COPY,
  3323.  end of each successful COPY.  If you set the SQL*Plus SET system_variable
  3324.  77,COPY,
  3325.  COPYCOMMIT to a positive value n, SQL*Plus performs a commit after copying
  3326.  78,COPY,
  3327.  every n batches of records; the SET system_variable ARRAYSIZE clause
  3328.  79,COPY,
  3329.  determines the size of the batch.
  3330.  80,COPY,
  3331.  
  3332.  81,COPY,
  3333.  
  3334.  82,COPY,
  3335.  Examples: The command below copies the entire EMP table from database HQ
  3336.  83,COPY,
  3337.            to a table named WESTEMP in database WEST.  If WESTEMP already
  3338.  84,COPY,
  3339.            exists, SQL*Plus replaces its contents.  Columns in WESTEMP have
  3340.  85,COPY,
  3341.            the same names as the columns in the source table, EMP:
  3342.  86,COPY,
  3343.  
  3344.  87,COPY,
  3345.                SQL> COPY FROM SCOTT/TIGER@HQ TO JOHN/CHROME@WEST -
  3346.  88,COPY,
  3347.                > REPLACE WESTEMP -
  3348.  89,COPY,
  3349.                > USING SELECT * FROM EMP
  3350.  90,COPY,
  3351.  
  3352.  91,COPY,
  3353.  
  3354.  92,COPY,
  3355.            The following command copies selected records from EMP in
  3356.  93,COPY,
  3357.            database HQ to the database to which SQL*Plus is connected:
  3358.  94,COPY,
  3359.            SQL*Plus creates SALESMEN through the copy.  SQL*Plus copies
  3360.  95,COPY,
  3361.            only the columns EMPNO and ENAME and at the destination names
  3362.  96,COPY,
  3363.            them EMPNO and SALESMAN.
  3364.  97,COPY,
  3365.  
  3366.  98,COPY,
  3367.                SQL> COPY FROM SCOTT/TIGER@HQ -
  3368.  99,COPY,
  3369.                > CREATE SALESMEN (EMPNO,SALESMAN) -
  3370. 100,COPY,
  3371.                > USING SELECT EMPNO, ENAME FROM EMP -
  3372. 101,COPY,
  3373.                > WHERE JOB='SALES'
  3374. 102,COPY,
  3375.  
  3376. 103,COPY,
  3377.  
  3378. 104,COPY,
  3379.            SQL*Plus creates SALESMEN through the copy, copies columns EMPNO
  3380. 105,COPY,
  3381.            and ENAME, and names them EMPNO and SALESMAN at the destination.
  3382. 106,COPY,
  3383.  
  3384. 107,COPY,
  3385.  
  3386. 108,COPY,
  3387.  See also: connect, disconnect, describe, edit, set (arraysize, copycommit,
  3388. 109,COPY,
  3389.            long), commands, menu.
  3390.   1,CREATE CLUSTER,
  3391.  
  3392.   2,CREATE CLUSTER,
  3393.  
  3394.   3,CREATE CLUSTER,
  3395.                                CREATE CLUSTER
  3396.   4,CREATE CLUSTER,
  3397.                                                             SQL statement
  3398.   5,CREATE CLUSTER,
  3399.  CREATE CLUSTER user.cluster
  3400.   6,CREATE CLUSTER,
  3401.     column datatype, column datatype,...
  3402.   7,CREATE CLUSTER,
  3403.     PCTUSED integer  PCTFREE integer
  3404.   8,CREATE CLUSTER,
  3405.     SIZE integer
  3406.   9,CREATE CLUSTER,
  3407.     INITRANS integer MAXTRANS integer
  3408.  10,CREATE CLUSTER,
  3409.     TABLESPACE tablespace
  3410.  11,CREATE CLUSTER,
  3411.     STORAGE storage
  3412.  12,CREATE CLUSTER,
  3413.  
  3414.  13,CREATE CLUSTER,
  3415.  Creates a cluster that may contain one or more tables.  Clustering forces
  3416.  14,CREATE CLUSTER,
  3417.  rows of one or more tables with the same cluster key to be stored together
  3418.  15,CREATE CLUSTER,
  3419.  in the database.  Access time to rows with the same cluster key is faster.
  3420.  16,CREATE CLUSTER,
  3421.  Generally, it's good to cluster tables that are often joined together.
  3422.  17,CREATE CLUSTER,
  3423.  
  3424.  18,CREATE CLUSTER,
  3425.  Column is the name of one or more columns that are the cluster key.  The
  3426.  19,CREATE CLUSTER,
  3427.  datatype cannot be NULL or NOT NULL.  SIZE specifies the average space
  3428.  20,CREATE CLUSTER,
  3429.  required to store all rows with the same cluster key value.
  3430.  21,CREATE CLUSTER,
  3431.  
  3432.  22,CREATE CLUSTER,
  3433.  CREATE TABLE describes PCTUSED, PCTFREE, INITRANS, and MAXTRANS integers.
  3434.  23,CREATE CLUSTER,
  3435.  
  3436.  24,CREATE CLUSTER,
  3437.  See also: create index, create table, commands, menu.
  3438.   1,CREATE DATABASE,
  3439.  
  3440.   2,CREATE DATABASE,
  3441.  
  3442.   3,CREATE DATABASE,
  3443.                                   CREATE DATABASE
  3444.   4,CREATE DATABASE,
  3445.                                                         SQL statement
  3446.   5,CREATE DATABASE,
  3447.  CREATE DATABASE database
  3448.   6,CREATE DATABASE,
  3449.     CONTROLFILE REUSE                         WARNING:  If the specified
  3450.   7,CREATE DATABASE,
  3451.     LOGFILE filespec, filespec,...            database currently exists,
  3452.   8,CREATE DATABASE,
  3453.     MAXLOGFILES integer                       using CREATE DATABASE will
  3454.   9,CREATE DATABASE,
  3455.     DATAFILE filespec, filespec,...           destroy any data within it.
  3456.  10,CREATE DATABASE,
  3457.  MAXDATAFILES integer
  3458.  11,CREATE DATABASE,
  3459.  MAXINSTANCES integer
  3460.  12,CREATE DATABASE,
  3461.     ARCHIVELOG | NOARCHIVELOG                 --default is NOARCHIVELOG
  3462.  13,CREATE DATABASE,
  3463.     SHARED | EXCLUSIVE                        --default is SHARED
  3464.  14,CREATE DATABASE,
  3465.  
  3466.  15,CREATE DATABASE,
  3467.  CREATE DATABASE prepares a database for initial use.
  3468.  16,CREATE DATABASE,
  3469.  
  3470.  17,CREATE DATABASE,
  3471.      database
  3472.  18,CREATE DATABASE,
  3473.          is a database name, up to 8 characters. If omitted, the database
  3474.  19,CREATE DATABASE,
  3475.          name is the one specified by the INIT.ORA parameter DB_NAME.
  3476.  20,CREATE DATABASE,
  3477.  
  3478.  21,CREATE DATABASE,
  3479.      CONTROLFILE REUSE
  3480.  22,CREATE DATABASE,
  3481.          reuses files specified by the INIT.ORA parameter CONTROL_FILES,
  3482.  23,CREATE DATABASE,
  3483.          erasing any data they may currently hold.  Ususlly omitted the
  3484.  24,CREATE DATABASE,
  3485.          first time a database is created.
  3486.  25,CREATE DATABASE,
  3487.  
  3488.  26,CREATE DATABASE,
  3489.      LOGFILE filespec
  3490.  27,CREATE DATABASE,
  3491.          specifies one or more files as redo log files; if omitted, ORACLE
  3492.  28,CREATE DATABASE,
  3493.          creates two default log files with names and sizes that depend on
  3494.  29,CREATE DATABASE,
  3495.          the operating system.
  3496.  30,CREATE DATABASE,
  3497.  
  3498.  31,CREATE DATABASE,
  3499.      MAXLOGFILES integer
  3500.  32,CREATE DATABASE,
  3501.          sets the maximum number of redo log files that can be created for
  3502.  33,CREATE DATABASE,
  3503.          the database; the range is 2 - 256.  The number can be increased
  3504.  34,CREATE DATABASE,
  3505.          only by recreating the database.  The overhead incurred by a large
  3506.  35,CREATE DATABASE,
  3507.          number is negligible.
  3508.  36,CREATE DATABASE,
  3509.  
  3510.  37,CREATE DATABASE,
  3511.      filespec
  3512.  38,CREATE DATABASE,
  3513.          specifies a file, written 'filename' SIZE integer K | M REUSE.
  3514.  39,CREATE DATABASE,
  3515.          Integer specifies the SIZE in bytes; K = integer x 1024 bytes;
  3516.  40,CREATE DATABASE,
  3517.          M = integer x 1,048,576 bytes.  If integer is omitted, ORACLE
  3518.  41,CREATE DATABASE,
  3519.          uses a default of 10M for database files and 500K for log files.
  3520.  42,CREATE DATABASE,
  3521.  
  3522.  43,CREATE DATABASE,
  3523.      DATAFILE filespec
  3524.  44,CREATE DATABASE,
  3525.          specifies one or more files as database files; if omitted, ORACLE
  3526.  45,CREATE DATABASE,
  3527.          creates one file with a name that depends on the operating system.
  3528.  46,CREATE DATABASE,
  3529.  
  3530.  47,CREATE DATABASE,
  3531.      MAXDATAFILES integer
  3532.  48,CREATE DATABASE,
  3533.          sets the maximum number of database files that can be created for
  3534.  49,CREATE DATABASE,
  3535.          the database; the range is typically 1 - 255.  The number can't be
  3536.  50,CREATE DATABASE,
  3537.          increased without recreating the database.  The overhead incurred
  3538.  51,CREATE DATABASE,
  3539.          by a large number is negligible.
  3540.  52,CREATE DATABASE,
  3541.  
  3542.  53,CREATE DATABASE,
  3543.      MAXINSTANCES integer
  3544.  54,CREATE DATABASE,
  3545.          sets the maximum number of instances which can mount and open the
  3546.  55,CREATE DATABASE,
  3547.          database at the same time; the range is 1 - 255.
  3548.  56,CREATE DATABASE,
  3549.  
  3550.  57,CREATE DATABASE,
  3551.      ARCHIVELOG or NOARCHIVELOG
  3552.  58,CREATE DATABASE,
  3553.          specifies the initial mode of redo log files use.  ARCHIVELOG sets
  3554.  59,CREATE DATABASE,
  3555.          log files to be archived before they are reused, NOARCHIVELOG does
  3556.  60,CREATE DATABASE,
  3557.          not; NOARCHIVELOG is the default.  ALTER DATABASE changes the mode.
  3558.  61,CREATE DATABASE,
  3559.  
  3560.  62,CREATE DATABASE,
  3561.      SHARED or EXCLUSIVE
  3562.  63,CREATE DATABASE,
  3563.          sets the availability of the database at the end of creation.  If
  3564.  64,CREATE DATABASE,
  3565.          SHARED, multiple instances can access the database; if EXCLUSIVE,
  3566.  65,CREATE DATABASE,
  3567.          only one instance can access it.  After creation, use the SQL*DBA
  3568.  66,CREATE DATABASE,
  3569.          command STARTUP to set access to the database.
  3570.  67,CREATE DATABASE,
  3571.  
  3572.  68,CREATE DATABASE,
  3573.  
  3574.  69,CREATE DATABASE,
  3575.  See also: alter database, create rollback, create tablespace, commands.
  3576.   1,CREATE DB LINK,
  3577.  
  3578.   2,CREATE DB LINK,
  3579.  
  3580.   3,CREATE DB LINK,
  3581.                                CREATE DB LINK
  3582.   4,CREATE DB LINK,
  3583.                                                              SQL statement
  3584.   5,CREATE DB LINK,
  3585.  CREATE PUBLIC DATABASE LINK linkname
  3586.   6,CREATE DB LINK,
  3587.     CONNECT TO username IDENTIFIED BY password
  3588.   7,CREATE DB LINK,
  3589.     USING 'sql*net_string'
  3590.   8,CREATE DB LINK,
  3591.  
  3592.   9,CREATE DB LINK,
  3593.  CREATE DATABASE LINK sets up a link from the local database to a username
  3594.  10,CREATE DB LINK,
  3595.  on a remote database.  To query a remote table, add @linkname after its
  3596.  11,CREATE DB LINK,
  3597.  name in the FROM clause of a SELECT statement.
  3598.  12,CREATE DB LINK,
  3599.  
  3600.  13,CREATE DB LINK,
  3601.     PUBLIC
  3602.  14,CREATE DB LINK,
  3603.         makes the link available to all users except those who've defined
  3604.  15,CREATE DB LINK,
  3605.         a private database link with the same name.  If PUBLIC is omitted,
  3606.  16,CREATE DB LINK,
  3607.         the link is private--available only to its creator.
  3608.  17,CREATE DB LINK,
  3609.  
  3610.  18,CREATE DB LINK,
  3611.     username, password
  3612.  19,CREATE DB LINK,
  3613.         must exist on the remote database.  If omitted, the database link
  3614.  20,CREATE DB LINK,
  3615.         will use the current username and password when invoked.
  3616.  21,CREATE DB LINK,
  3617.  
  3618.  22,CREATE DB LINK,
  3619.     'sql*net_string'
  3620.  23,CREATE DB LINK,
  3621.         specifies a remote database accessible through SQL*Net.
  3622.  24,CREATE DB LINK,
  3623.  
  3624.  25,CREATE DB LINK,
  3625.  See also: distributed query, select, from, create synonym, commands, menu.
  3626.   1,CREATE INDEX,
  3627.  
  3628.   2,CREATE INDEX,
  3629.  
  3630.   3,CREATE INDEX,
  3631.                                 CREATE INDEX
  3632.   4,CREATE INDEX,
  3633.                                                              SQL statement
  3634.   5,CREATE INDEX,
  3635.  CREATE UNIQUE INDEX index ON table (column ASC|DESC, column ASC|DESC,...)
  3636.   6,CREATE INDEX,
  3637.      | CLUSTER cluster
  3638.   7,CREATE INDEX,
  3639.      INITRANS integer  MAXTRANS integer
  3640.   8,CREATE INDEX,
  3641.      TABLESPACE tablespace
  3642.   9,CREATE INDEX,
  3643.      STORAGE storage
  3644.  10,CREATE INDEX,
  3645.      PCTFREE = 10 | n
  3646.  11,CREATE INDEX,
  3647.      NOSORT
  3648.  12,CREATE INDEX,
  3649.  
  3650.  13,CREATE INDEX,
  3651.  CREATE INDEX creates an index for a table or a cluster index.  An index
  3652.  14,CREATE INDEX,
  3653.  reduces access time by giving direct access to rows in a table; you can
  3654.  15,CREATE INDEX,
  3655.  also use an index to enforce uniqueness.  An index may contain up to 16
  3656.  16,CREATE INDEX,
  3657.  columns.  You may create multiple indexes on combinations of columns in
  3658.  17,CREATE INDEX,
  3659.  the same table, but each index increases processing time during updates.
  3660.  18,CREATE INDEX,
  3661.  
  3662.  19,CREATE INDEX,
  3663.      UNIQUE
  3664.  20,CREATE INDEX,
  3665.          ensures that the table never has two rows with identical values
  3666.  21,CREATE INDEX,
  3667.          in all index columns.
  3668.  22,CREATE INDEX,
  3669.  
  3670.  23,CREATE INDEX,
  3671.      index, table
  3672.  24,CREATE INDEX,
  3673.          are the names of the index and the table for which the index is
  3674.  25,CREATE INDEX,
  3675.          being created.
  3676.  26,CREATE INDEX,
  3677.  
  3678.  27,CREATE INDEX,
  3679.      column
  3680.  28,CREATE INDEX,
  3681.          is the name of a column in the table.
  3682.  29,CREATE INDEX,
  3683.  
  3684.  30,CREATE INDEX,
  3685.      ASC or DESC
  3686.  31,CREATE INDEX,
  3687.          are for DB2 compatibility. Indexes are created in ascending order.
  3688.  32,CREATE INDEX,
  3689.  
  3690.  33,CREATE INDEX,
  3691.      cluster
  3692.  34,CREATE INDEX,
  3693.          is the name of a cluster for which the index is being created.
  3694.  35,CREATE INDEX,
  3695.  
  3696.  36,CREATE INDEX,
  3697.      tablespace
  3698.  37,CREATE INDEX,
  3699.          is the name of the tablespace that will hold the index.
  3700.  38,CREATE INDEX,
  3701.  
  3702.  39,CREATE INDEX,
  3703.      PCTFREE
  3704.  40,CREATE INDEX,
  3705.          sets the percentage of space in each index block to leave free for
  3706.  41,CREATE INDEX,
  3707.          updates and insertions.
  3708.  42,CREATE INDEX,
  3709.  
  3710.  43,CREATE INDEX,
  3711.      NOSORT
  3712.  44,CREATE INDEX,
  3713.          prevents ORACLE from sorting the rows when generating the index,
  3714.  45,CREATE INDEX,
  3715.          because the rows are already stored in ascending order.  NOSORT
  3716.  46,CREATE INDEX,
  3717.          can greatly reduce the time required to create an index. NOSORT
  3718.  47,CREATE INDEX,
  3719.          cannot be used when creating a cluster index.
  3720.  48,CREATE INDEX,
  3721.  
  3722.  49,CREATE INDEX,
  3723.  
  3724.  50,CREATE INDEX,
  3725.  See CREATE TABLE for descriptions of INITRANS and MAXTRANS; see STORAGE
  3726.  51,CREATE INDEX,
  3727.  for the syntax of the STORAGE clause.
  3728.  52,CREATE INDEX,
  3729.  
  3730.  53,CREATE INDEX,
  3731.  
  3732.  54,CREATE INDEX,
  3733.  See also: alter index, drop index, validate index, commands, menu.
  3734.   1,CREATE ROLLBACK SEGMENT,
  3735.  
  3736.   2,CREATE ROLLBACK SEGMENT,
  3737.  
  3738.   3,CREATE ROLLBACK SEGMENT,
  3739.                           CREATE ROLLBACK SEGMENT
  3740.   4,CREATE ROLLBACK SEGMENT,
  3741.                                                               SQL statement
  3742.   5,CREATE ROLLBACK SEGMENT,
  3743.  CREATE PUBLIC ROLLBACK SEGMENT rollback_segment_name
  3744.   6,CREATE ROLLBACK SEGMENT,
  3745.      TABLESPACE tablespace
  3746.   7,CREATE ROLLBACK SEGMENT,
  3747.      STORAGE storage
  3748.   8,CREATE ROLLBACK SEGMENT,
  3749.  
  3750.   9,CREATE ROLLBACK SEGMENT,
  3751.  CREATE ROLLBACK SEGMENT creates a rollback segment.  The tablespace must
  3752.  10,CREATE ROLLBACK SEGMENT,
  3753.  be on-line when a rollback segment is added to it.
  3754.  11,CREATE ROLLBACK SEGMENT,
  3755.  
  3756.  12,CREATE ROLLBACK SEGMENT,
  3757.      PUBLIC
  3758.  13,CREATE ROLLBACK SEGMENT,
  3759.          specifies that the rollback segment be available to any instance
  3760.  14,CREATE ROLLBACK SEGMENT,
  3761.          requesting it. If omitted, the rollback segment is private.
  3762.  15,CREATE ROLLBACK SEGMENT,
  3763.  
  3764.  16,CREATE ROLLBACK SEGMENT,
  3765.      rollback_segment_name
  3766.  17,CREATE ROLLBACK SEGMENT,
  3767.          is an ORACLE identifier of up to 30 characters.
  3768.  18,CREATE ROLLBACK SEGMENT,
  3769.  
  3770.  19,CREATE ROLLBACK SEGMENT,
  3771.      tablespace
  3772.  20,CREATE ROLLBACK SEGMENT,
  3773.          is the tablespace in which the rollback segment is being created.
  3774.  21,CREATE ROLLBACK SEGMENT,
  3775.          If omitted, the SYSTEM tablespace is used.
  3776.  22,CREATE ROLLBACK SEGMENT,
  3777.  
  3778.  23,CREATE ROLLBACK SEGMENT,
  3779.  See also: create tablespace, create database, alter rollback segment,
  3780.  24,CREATE ROLLBACK SEGMENT,
  3781.            drop rollback segment, rollback, savepoint, commands, menu.
  3782.   1,CREATE SEQUENCE,
  3783.  
  3784.   2,CREATE SEQUENCE,
  3785.  
  3786.   3,CREATE SEQUENCE,
  3787.                                CREATE SEQUENCE
  3788.   4,CREATE SEQUENCE,
  3789.                                                            SQL statement
  3790.   5,CREATE SEQUENCE,
  3791.  CREATE SEQUENCE user.sequence_name
  3792.   6,CREATE SEQUENCE,
  3793.      INCREMENT BY n
  3794.   7,CREATE SEQUENCE,
  3795.      START WITH n
  3796.   8,CREATE SEQUENCE,
  3797.      MAXVALUE n | NOMAXVALUE
  3798.   9,CREATE SEQUENCE,
  3799.      MINVALUE n | NOMINVALUE
  3800.  10,CREATE SEQUENCE,
  3801.      CYCLE | NOCYCLE
  3802.  11,CREATE SEQUENCE,
  3803.      CACHE 20 | n | NOCACHE
  3804.  12,CREATE SEQUENCE,
  3805.      ORDER | NOORDER
  3806.  13,CREATE SEQUENCE,
  3807.  
  3808.  14,CREATE SEQUENCE,
  3809.  CREATE SEQUENCE sets up an ORACLE object from which users can generate
  3810.  15,CREATE SEQUENCE,
  3811.  unique integers.  You can use sequence numbers to generate primary keys
  3812.  16,CREATE SEQUENCE,
  3813.  automatically.
  3814.  17,CREATE SEQUENCE,
  3815.  
  3816.  18,CREATE SEQUENCE,
  3817.      user
  3818.  19,CREATE SEQUENCE,
  3819.          is the sequence owner.  The default is the user who is running
  3820.  20,CREATE SEQUENCE,
  3821.          the CREATE SEQUENCE statement.
  3822.  21,CREATE SEQUENCE,
  3823.  
  3824.  22,CREATE SEQUENCE,
  3825.      INCREMENT BY n
  3826.  23,CREATE SEQUENCE,
  3827.          sets the interval between sequence numbers.  If n is positive, the
  3828.  24,CREATE SEQUENCE,
  3829.          sequence ascends; if negative, it descends.  The default is 1.
  3830.  25,CREATE SEQUENCE,
  3831.  
  3832.  26,CREATE SEQUENCE,
  3833.      START WITH n
  3834.  27,CREATE SEQUENCE,
  3835.          is the first sequence number to be created.  The default for an
  3836.  28,CREATE SEQUENCE,
  3837.          ascending sequence is MINVALUE; for a descending sequence, the
  3838.  29,CREATE SEQUENCE,
  3839.          default is MAXVALUE.
  3840.  30,CREATE SEQUENCE,
  3841.  
  3842.  31,CREATE SEQUENCE,
  3843.      MAXVALUE n | NOMAXVALUE
  3844.  32,CREATE SEQUENCE,
  3845.          is the largest number the sequence will generate.  The default is
  3846.  33,CREATE SEQUENCE,
  3847.          10e27-1 for an ascending sequence, 1 for a descending sequence.
  3848.  34,CREATE SEQUENCE,
  3849.  
  3850.  35,CREATE SEQUENCE,
  3851.      MINVALUE n | NOMINVALUE
  3852.  36,CREATE SEQUENCE,
  3853.          is the smallest number the sequence will generate.  The default is
  3854.  37,CREATE SEQUENCE,
  3855.          1 for an ascending sequence, 10e27-1 for a descending sequence.
  3856.  38,CREATE SEQUENCE,
  3857.  
  3858.  39,CREATE SEQUENCE,
  3859.      CYCLE | NOCYCLE
  3860.  40,CREATE SEQUENCE,
  3861.          If CYCLE, the sequence goes to MINVALUE after reaching MAXVALUE
  3862.  41,CREATE SEQUENCE,
  3863.          for ascending sequences, or to MAXVALUE after reaching MINVALUE
  3864.  42,CREATE SEQUENCE,
  3865.          for descending sequences.  If NOCYCLE (the default), no numbers
  3866.  43,CREATE SEQUENCE,
  3867.          will be generated after the end of the sequence is reached.
  3868.  44,CREATE SEQUENCE,
  3869.  
  3870.  45,CREATE SEQUENCE,
  3871.      CACHE n | NOCACHE
  3872.  46,CREATE SEQUENCE,
  3873.          CACHE pre-allocates sequence numbers so they may be kept in memory
  3874.  47,CREATE SEQUENCE,
  3875.          to improve generation speed.  The CACHE value must be less than
  3876.  48,CREATE SEQUENCE,
  3877.          MAXVALUE minus MINVALUE.  The default is CACHE 20.
  3878.  49,CREATE SEQUENCE,
  3879.  
  3880.  50,CREATE SEQUENCE,
  3881.      ORDER | NOORDER
  3882.  51,CREATE SEQUENCE,
  3883.          ORDER guarantees that sequence numbers will be generated in order
  3884.  52,CREATE SEQUENCE,
  3885.          of request, important for sequence numbers used as timestamps.
  3886.  53,CREATE SEQUENCE,
  3887.          Even with NOORDER (the default), sequence numbers are usually
  3888.  54,CREATE SEQUENCE,
  3889.          generated in order.
  3890.  55,CREATE SEQUENCE,
  3891.  
  3892.  56,CREATE SEQUENCE,
  3893.  
  3894.  57,CREATE SEQUENCE,
  3895.  See also: sequences, nextval, keys, alter sequence, audit, drop sequence,
  3896.  58,CREATE SEQUENCE,
  3897.            commands, menu.
  3898.   1,CREATE SYNONYM,
  3899.  
  3900.   2,CREATE SYNONYM,
  3901.  
  3902.   3,CREATE SYNONYM,
  3903.                                CREATE SYNONYM
  3904.   4,CREATE SYNONYM,
  3905.                                                             SQL statement
  3906.   5,CREATE SYNONYM,
  3907.  CREATE PUBLIC SYNONYM user.synonym_name
  3908.   6,CREATE SYNONYM,
  3909.      FOR user.table_or_view @databaselink
  3910.   7,CREATE SYNONYM,
  3911.  
  3912.   8,CREATE SYNONYM,
  3913.  CREATE SYNONYM creates a synonym for a table or view.  A private synonym
  3914.   9,CREATE SYNONYM,
  3915.  name must be different from any other object owned by the same user.
  3916.  10,CREATE SYNONYM,
  3917.  
  3918.  11,CREATE SYNONYM,
  3919.      PUBLIC
  3920.  12,CREATE SYNONYM,
  3921.          specifies that the synonym be accessible by all users. If omitted,
  3922.  13,CREATE SYNONYM,
  3923.          the synonym is private, accessible only by the synonym's creator.
  3924.  14,CREATE SYNONYM,
  3925.  
  3926.  15,CREATE SYNONYM,
  3927.      user
  3928.  16,CREATE SYNONYM,
  3929.          is a username.  If omitted, ORACLE assumes you own the table/view.
  3930.  17,CREATE SYNONYM,
  3931.  
  3932.  18,CREATE SYNONYM,
  3933.      databaselink
  3934.  19,CREATE SYNONYM,
  3935.          is an existing link to a remote database.  If user is omitted, the
  3936.  20,CREATE SYNONYM,
  3937.          synonym refers to a table belonging to the databaselink username.
  3938.  21,CREATE SYNONYM,
  3939.  
  3940.  22,CREATE SYNONYM,
  3941.  
  3942.  23,CREATE SYNONYM,
  3943.  See also: synonyms, user id, create database link, create table,
  3944.  24,CREATE SYNONYM,
  3945.            create view, remote databases, menu.
  3946.   1,CREATE TABLE,
  3947.  
  3948.   2,CREATE TABLE,
  3949.  
  3950.   3,CREATE TABLE,
  3951.                                 CREATE TABLE
  3952.   4,CREATE TABLE,
  3953.                                                            SQL statement
  3954.   5,CREATE TABLE,
  3955.  CREATE TABLE user.table_name column_element | table_element,
  3956.   6,CREATE TABLE,
  3957.                               column_element | table_element,...
  3958.   7,CREATE TABLE,
  3959.      PCTFREE n   PCTUSED n
  3960.   8,CREATE TABLE,
  3961.      INITRANS n  MAXTRANS n
  3962.   9,CREATE TABLE,
  3963.      TABLESPACE tablespace
  3964.  10,CREATE TABLE,
  3965.      STORAGE storage
  3966.  11,CREATE TABLE,
  3967.      CLUSTER cluster column, column,...
  3968.  12,CREATE TABLE,
  3969.      AS query
  3970.  13,CREATE TABLE,
  3971.  
  3972.  14,CREATE TABLE,
  3973.  CREATE TABLE creates a table, with 1 to 254 columns.  Unless a query is
  3974.  15,CREATE TABLE,
  3975.  specified, the table is created with no data.  Rows are normally added
  3976.  16,CREATE TABLE,
  3977.  with the INSERT statement.
  3978.  17,CREATE TABLE,
  3979.  
  3980.  18,CREATE TABLE,
  3981.      user
  3982.  19,CREATE TABLE,
  3983.          is the table's owner; the default is the current user.
  3984.  20,CREATE TABLE,
  3985.  
  3986.  21,CREATE TABLE,
  3987.      column_element
  3988.  22,CREATE TABLE,
  3989.          defines the columns and optional column constraints of the table.
  3990.  23,CREATE TABLE,
  3991.  
  3992.  24,CREATE TABLE,
  3993.      table_element
  3994.  25,CREATE TABLE,
  3995.          defines the table constraints.
  3996.  26,CREATE TABLE,
  3997.  
  3998.  27,CREATE TABLE,
  3999.      PCTFREE n
  4000.  28,CREATE TABLE,
  4001.          specifies a positive integer from 0 - 100 as the percentage of
  4002.  29,CREATE TABLE,
  4003.          room for future updates in every block allocated to the table;
  4004.  30,CREATE TABLE,
  4005.          the default is 10.  100 is not a useful setting; no rows could
  4006.  31,CREATE TABLE,
  4007.          be inserted.  The combination of PCTFREE and PCTUSED determines
  4008.  32,CREATE TABLE,
  4009.          whether inserted rows go into existing blocks or into new blocks.
  4010.  33,CREATE TABLE,
  4011.  
  4012.  34,CREATE TABLE,
  4013.      PCTUSED n
  4014.  35,CREATE TABLE,
  4015.          sets a positive integer from 0 - 100 as the minimum level of space
  4016.  36,CREATE TABLE,
  4017.          usage maintained for each block of the table; the default is 40.
  4018.  37,CREATE TABLE,
  4019.          A block is listed as free (it can accept row insertions) when its
  4020.  38,CREATE TABLE,
  4021.          space usage falls below PCTUSED.  Blocks are removed from the free
  4022.  39,CREATE TABLE,
  4023.          block list when insertions run space usage to the PCTFREE limit.
  4024.  40,CREATE TABLE,
  4025.          A higher PCTUSED value results in more efficient use of space in
  4026.  41,CREATE TABLE,
  4027.          the table at the expense of reduced performance.
  4028.  42,CREATE TABLE,
  4029.  
  4030.  43,CREATE TABLE,
  4031.      INITRANS n
  4032.  44,CREATE TABLE,
  4033.          sets the initial number of transaction entries allocated within
  4034.  45,CREATE TABLE,
  4035.          each block.  The range is 1 - 255; the default is 1.  ORACLE
  4036.  46,CREATE TABLE,
  4037.          reserves 23 bytes in the block's free space for each transaction
  4038.  47,CREATE TABLE,
  4039.          when the block is first used.  When the number of concurrent
  4040.  48,CREATE TABLE,
  4041.          transactions exceeds INITRANS, transaction entries are dynamically
  4042.  49,CREATE TABLE,
  4043.          allocated up to MAXTRANS, or until the block runs out of free
  4044.  50,CREATE TABLE,
  4045.          space.
  4046.  51,CREATE TABLE,
  4047.  
  4048.  52,CREATE TABLE,
  4049.      MAXTRANS n
  4050.  53,CREATE TABLE,
  4051.          sets the maximun number of transactions that may update a block
  4052.  54,CREATE TABLE,
  4053.          concurrently.  The range is 1 - 255; the default is 255.
  4054.  55,CREATE TABLE,
  4055.  
  4056.  56,CREATE TABLE,
  4057.      tablespace
  4058.  57,CREATE TABLE,
  4059.          is where the table will exist.  The default tablespace is STORAGE.
  4060.  58,CREATE TABLE,
  4061.  
  4062.  59,CREATE TABLE,
  4063.      STORAGE
  4064.  60,CREATE TABLE,
  4065.          sets future space allocation for the table.
  4066.  61,CREATE TABLE,
  4067.  
  4068.  62,CREATE TABLE,
  4069.      CLUSTER cluster column, column,...
  4070.  63,CREATE TABLE,
  4071.          includes the table in the specified cluster, owned by the user.
  4072.  64,CREATE TABLE,
  4073.          Specify one table column for each column in the cluster key, with
  4074.  65,CREATE TABLE,
  4075.          the first table column corresponding to the first cluster column,
  4076.  66,CREATE TABLE,
  4077.          and so on; table and cluster column names need not match.  The
  4078.  67,CREATE TABLE,
  4079.          cluster columns of a table are usually one or more columns in the
  4080.  68,CREATE TABLE,
  4081.          table's primary key.
  4082.  69,CREATE TABLE,
  4083.  
  4084.  70,CREATE TABLE,
  4085.      query
  4086.  71,CREATE TABLE,
  4087.          is a SELECT clause. The columns named in the query must match the
  4088.  72,CREATE TABLE,
  4089.          columns in the CREATE TABLE statement; the datatypes and sizes of
  4090.  73,CREATE TABLE,
  4091.          the new table's columns are copied from the columns in the query.
  4092.  74,CREATE TABLE,
  4093.          If the query's columns have fully-defined and unique names, the
  4094.  75,CREATE TABLE,
  4095.          columns may be omitted after CREATE TABLE, and the query's column
  4096.  76,CREATE TABLE,
  4097.          names will be the column names in the new table.  After creation,
  4098.  77,CREATE TABLE,
  4099.          the results of the query are inserted in the new table.  The query
  4100.  78,CREATE TABLE,
  4101.          may not contain an ORDER BY or a FOR UPDATE OF clause.
  4102.  79,CREATE TABLE,
  4103.  
  4104.  80,CREATE TABLE,
  4105.          If a query is used, table_element may contain column names only.
  4106.  81,CREATE TABLE,
  4107.          Use ALTER TABLE...ADD to add column and table constraints.  To
  4108.  82,CREATE TABLE,
  4109.          change column and table constraints, DROP the constraints and then
  4110.  83,CREATE TABLE,
  4111.          ADD them.  The query, if used, must contain the last CREATE TABLE
  4112.  84,CREATE TABLE,
  4113.          clause.
  4114.  85,CREATE TABLE,
  4115.  
  4116.  86,CREATE TABLE,
  4117.  Example:  To define the table staff, as user scott, you could enter:
  4118.  87,CREATE TABLE,
  4119.  
  4120.  88,CREATE TABLE,
  4121.                CREATE TABLE staff (
  4122.  89,CREATE TABLE,
  4123.                   empno    NUMBER       NOT NULL   PRIMARY KEY,
  4124.  90,CREATE TABLE,
  4125.                   ename    CHAR(20)     NOT NULL   CHECK (ename = UPPER),
  4126.  91,CREATE TABLE,
  4127.                   job      CHAR(10),
  4128.  92,CREATE TABLE,
  4129.                   mgr      NUMBER       REFERENCES scott.staff(empno),
  4130.  93,CREATE TABLE,
  4131.                   hiredate DATE         CHECK (hiredate >= SYSDATE - 7),
  4132.  94,CREATE TABLE,
  4133.                   sal      NUMBER(10,2) CHECK (sal > 800),
  4134.  95,CREATE TABLE,
  4135.                   comm     NUMBER(9,2)  DEFAULT NULL,
  4136.  96,CREATE TABLE,
  4137.                   deptno   NOT NULL     REFERENCES scott.dept(deptno)
  4138.  97,CREATE TABLE,
  4139.                )
  4140.  98,CREATE TABLE,
  4141.                PCTFREE 5 PCTUSED 75
  4142.  99,CREATE TABLE,
  4143.  
  4144. 100,CREATE TABLE,
  4145.  See also: alter table, create cluster, create index, create tablespace,
  4146. 101,CREATE TABLE,
  4147.            drop table, constraint, tables, commands, menu.
  4148.   1,CREATE TABLESPACE,
  4149.  
  4150.   2,CREATE TABLESPACE,
  4151.  
  4152.   3,CREATE TABLESPACE,
  4153.                               CREATE TABLESPACE
  4154.   4,CREATE TABLESPACE,
  4155.                                                             SQL statement
  4156.   5,CREATE TABLESPACE,
  4157.  CREATE TABLESPACE tablespace
  4158.   6,CREATE TABLESPACE,
  4159.      DATAFILE (filespec, filespec,...)
  4160.   7,CREATE TABLESPACE,
  4161.      DEFAULT STORAGE storage
  4162.   8,CREATE TABLESPACE,
  4163.      ONLINE | OFFLINE
  4164.   9,CREATE TABLESPACE,
  4165.  
  4166.  10,CREATE TABLESPACE,
  4167.  CREATE TABLESPACE creates a tablespace with the names of the files in it,
  4168.  11,CREATE TABLESPACE,
  4169.  default storage parameters, and whether the tablespace will be online or
  4170.  12,CREATE TABLESPACE,
  4171.  offline after its creation.  DBA privileges are required.
  4172.  13,CREATE TABLESPACE,
  4173.  
  4174.  14,CREATE TABLESPACE,
  4175.      filespec
  4176.  15,CREATE TABLESPACE,
  4177.          is a database file as:  'filename SIZE integer K | M REUSE
  4178.  16,CREATE TABLESPACE,
  4179.          REUSE specifies that any existing file with that name is reused,
  4180.  17,CREATE TABLESPACE,
  4181.          erasing any data it may contain.
  4182.  18,CREATE TABLESPACE,
  4183.  
  4184.  19,CREATE TABLESPACE,
  4185.  A tablespace is the unit of backup and recovery in a database, containing
  4186.  20,CREATE TABLESPACE,
  4187.  table, index, rollback, and temporary segments.  The tablespace SYSTEM is
  4188.  21,CREATE TABLESPACE,
  4189.  created when a database is created. System files may be added dynamically
  4190.  22,CREATE TABLESPACE,
  4191.  when a tablespace is online or offline.  Take a tablespace offline before
  4192.  23,CREATE TABLESPACE,
  4193.  dropping it.  Create at least one rollback segment for a tablespace.
  4194.  24,CREATE TABLESPACE,
  4195.  
  4196.  25,CREATE TABLESPACE,
  4197.  See also: alter tablespace, drop tablespace, commands, menu.
  4198.   1,CREATE VIEW,
  4199.  
  4200.   2,CREATE VIEW,
  4201.  
  4202.   3,CREATE VIEW,
  4203.                                  CREATE VIEW
  4204.   4,CREATE VIEW,
  4205.                                                              SQL statement
  4206.   5,CREATE VIEW,
  4207.  CREATE VIEW user.view_name alias, alias,...
  4208.   6,CREATE VIEW,
  4209.      AS query
  4210.   7,CREATE VIEW,
  4211.      WITH CHECK OPTION CONSTRAINT constraint
  4212.   8,CREATE VIEW,
  4213.  
  4214.   9,CREATE VIEW,
  4215.  CREATE VIEW defines a logical window to one or more tables or other views.
  4216.  10,CREATE VIEW,
  4217.  
  4218.  11,CREATE VIEW,
  4219.      query
  4220.  12,CREATE VIEW,
  4221.          is a SELECT statement (without ORDER BY or FOR UPDATE OF) that
  4222.  13,CREATE VIEW,
  4223.          identifies the columns and rows of the table(s) the view uses.
  4224.  14,CREATE VIEW,
  4225.  
  4226.  15,CREATE VIEW,
  4227.      WITH CHECK OPTION
  4228.  16,CREATE VIEW,
  4229.          specifies that inserts and updates done through the view will not
  4230.  17,CREATE VIEW,
  4231.          result in rows the view cannot access, useful if the view is based
  4232.  18,CREATE VIEW,
  4233.          on another view.
  4234.  19,CREATE VIEW,
  4235.  
  4236.  20,CREATE VIEW,
  4237.  You may use a view instead of a table in SELECT, INSERT, UPDATE, or DELETE
  4238.  21,CREATE VIEW,
  4239.  statements, but you may SELECT from a view only if the view query has:
  4240.  22,CREATE VIEW,
  4241.  
  4242.  23,CREATE VIEW,
  4243.      -  a join
  4244.  24,CREATE VIEW,
  4245.      -  a GROUP BY, CONNECT BY, or START WITH clause
  4246.  25,CREATE VIEW,
  4247.      -  the DISTINCT clause, pseudo-columns (like ROWNUM), or expressions
  4248.  26,CREATE VIEW,
  4249.         in the column list.  You may UPDATE a view that has pseudo-columns
  4250.  27,CREATE VIEW,
  4251.         or expressions if the UPDATE does not refer to them.
  4252.  28,CREATE VIEW,
  4253.  
  4254.  29,CREATE VIEW,
  4255.  See also: views, create table, create synonym, drop view, rename, menu.
  4256.   1,Commands,
  4257.  
  4258.   2,Commands,
  4259.  
  4260.   3,Commands,
  4261.                                    Commands
  4262.   4,Commands,
  4263.                                                      (Type help and then all
  4264.   5,Commands,
  4265.  SQL*Plus COMMANDS      SQL and PL/SQL STATEMENTS    or part of a topic name)
  4266.   6,Commands,
  4267.  ---------------------  -----------------------------------------------------
  4268.   7,Commands,
  4269.  @           get        alter cluster     create sequence    noaudit
  4270.   8,Commands,
  4271.  /           host       alter database    create synonym     null
  4272.   9,Commands,
  4273.  accept      input      alter index       create table       open
  4274.  10,Commands,
  4275.  append      list       alter rollback    create tablespace  raise
  4276.  11,Commands,
  4277.  break       pause      alter sequence    create view        rename
  4278.  12,Commands,
  4279.  btitle      prompt     alter table       declare            revoke
  4280.  13,Commands,
  4281.  change      remark     alter tablespace  delete             rollback
  4282.  14,Commands,
  4283.  clear       run        alter user        drop (objectname)  savepoint
  4284.  15,Commands,
  4285.  column      runform    audit             end                select
  4286.  16,Commands,
  4287.  compute     save       begin             exception          set transaction
  4288.  17,Commands,
  4289.  connect     set        close             exit               update
  4290.  18,Commands,
  4291.  copy        show       comment           fetch              validate index
  4292.  19,Commands,
  4293.  define      spool      commit            goto               constraints
  4294.  20,Commands,
  4295.  del         sqlplus    create cluster    grant
  4296.  21,Commands,
  4297.  describe    start      create database   if          ====== SEE ALSO ======
  4298.  22,Commands,
  4299.  disconnect  timing     create db link    insert       menu (of help topics)
  4300.  23,Commands,
  4301.  edit        undefine   create index      lock table   old commands (SQLPlus)
  4302.  24,Commands,
  4303.  exit        whenever   create rollback   loop         examples (SQL-PL/SQL)
  4304.   1,Comments,
  4305.  
  4306.   2,Comments,
  4307.  
  4308.   3,Comments,
  4309.                      Comments (SQL and PL/SQL)
  4310.   4,Comments,
  4311.  
  4312.   5,Comments,
  4313.  Comments are notes inserted for clarification; they have no effect
  4314.   6,Comments,
  4315.  on statement processing. In PL/SQL, you can begin a comment with --
  4316.   7,Comments,
  4317.  (two hyphens); this type of comment ends with the end of the line:
  4318.   8,Comments,
  4319.  
  4320.   9,Comments,
  4321.           x NUMBER := 0;        --initializes local copy of x
  4322.  10,Comments,
  4323.        BEGIN
  4324.  11,Comments,
  4325.           FOR i IN 1..4 LOOP
  4326.  12,Comments,
  4327.           x := x+1;             --increments local x
  4328.  13,Comments,
  4329.  
  4330.  14,Comments,
  4331.  In SQL and PL/SQL, you can begin a comment with /* and use as many
  4332.  15,Comments,
  4333.  lines as you wish to comment, then end with */ as shown below. Use
  4334.  16,Comments,
  4335.  /* and */ to surround parts of code you wish to temporary exclude.
  4336.  17,Comments,
  4337.  
  4338.  18,Comments,
  4339.        SELECT ename, sal, mgr  /* Get the name, salary, and manager
  4340.  19,Comments,
  4341.                                   for employees earning $2000 or more. */
  4342.  20,Comments,
  4343.           FROM emp
  4344.  21,Comments,
  4345.           WHERE sal >= 2000;
  4346.  22,Comments,
  4347.  
  4348.  23,Comments,
  4349.  
  4350.  24,Comments,
  4351.  See also: comment, commands, menu.
  4352.   1,Comparison Operators,
  4353.  
  4354.   2,Comparison Operators,
  4355.  
  4356.   3,Comparison Operators,
  4357.                            Comparison Operators
  4358.   4,Comparison Operators,
  4359.  
  4360.   5,Comparison Operators,
  4361.  Operator  Meaning/Function in SQL        Operator    Meaning/Function
  4362.   6,Comparison Operators,
  4363.  -----------------------------------------------------------------------------
  4364.   7,Comparison Operators,
  4365.   =        Equal to                       BETWEEN     Greater than or equal
  4366.   8,Comparison Operators,
  4367.  !=  <>    Not equal to                               to term 1, less than
  4368.   9,Comparison Operators,
  4369.  >=        Greater than or equal to                   or equal to term 2
  4370.  10,Comparison Operators,
  4371.  <=        Less than or equal to
  4372.  11,Comparison Operators,
  4373.  IN        Equal to any member of         NOT         Not greater or equal
  4374.  12,Comparison Operators,
  4375.  NOT IN    Not equal to any member of     BETWEEN     to term 1, not less
  4376.  13,Comparison Operators,
  4377.                                                       or equal to term 2
  4378.  14,Comparison Operators,
  4379.  ANY       Compares a value to each
  4380.  15,Comparison Operators,
  4381.            list value; must preface       EXISTS      True if subquery re-
  4382.  16,Comparison Operators,
  4383.            with =, !=, >, <, <=, >=                   turns 1 or more rows
  4384.  17,Comparison Operators,
  4385.  ALL       Compares a value to every      IS NULL     True if value is null
  4386.  18,Comparison Operators,
  4387.            list value; must preface                   (= NULL won't work)
  4388.  19,Comparison Operators,
  4389.            with =, !=, >, <, <=, >=       IS NOT NULL True if value is not
  4390.  20,Comparison Operators,
  4391.                                                       null (avoid != NULL)
  4392.  21,Comparison Operators,
  4393.  All return TRUE, FALSE or NULL.
  4394.  22,Comparison Operators,
  4395.  
  4396.  23,Comparison Operators,
  4397.  See also: like, boolean comparisons, subquery, nulls, menu.
  4398.   1,Conditions,
  4399.  
  4400.   2,Conditions,
  4401.  
  4402.   3,Conditions,
  4403.                                Conditions
  4404.   4,Conditions,
  4405.  
  4406.   5,Conditions,
  4407.  A SQL condition is one or more expressions and logical operators
  4408.   6,Conditions,
  4409.  that returns either TRUE or FALSE.  You can use conditions:
  4410.   7,Conditions,
  4411.  
  4412.   8,Conditions,
  4413.     - in the WHERE clause of SELECT, INSERT, UPDATE, and DELETE:
  4414.   9,Conditions,
  4415.  
  4416.  10,Conditions,
  4417.          SELECT ename, sal FROM emp WHERE job = 'ANALYST'...
  4418.  11,Conditions,
  4419.  
  4420.  12,Conditions,
  4421.     - in the CONNECT BY, START WITH, and HAVING clauses of SELECT:
  4422.  13,Conditions,
  4423.  
  4424.  14,Conditions,
  4425.          SELECT ename, mgr FROM emp
  4426.  15,Conditions,
  4427.             CONNECT BY PRIOR empno = mgr  START WITH ename = 'KING';
  4428.  16,Conditions,
  4429.  
  4430.  17,Conditions,
  4431.  In PL/SQL, IF statements and WHILE loops also require conditions.
  4432.  18,Conditions,
  4433.  
  4434.  19,Conditions,
  4435.  
  4436.  20,Conditions,
  4437.  See also: logical operators, where, select, insert, update, delete,
  4438.  21,Conditions,
  4439.            connect by, if, while (loops), comparison (operators),
  4440.  22,Conditions,
  4441.            boolean comparisons, menu.
  4442.   1,Constraints,
  4443.  
  4444.   2,Constraints,
  4445.  
  4446.   3,Constraints,
  4447.                                  Constraints
  4448.   4,Constraints,
  4449.                                                             SQL language
  4450.   5,Constraints,
  4451.  Table Constraint Syntax:
  4452.   6,Constraints,
  4453.  
  4454.   7,Constraints,
  4455.      UNIQUE | PRIMARY KEY column, column,...
  4456.   8,Constraints,
  4457.      CONSTRAINT constraint_name
  4458.   9,Constraints,
  4459.      FOREIGN KEY column, column,...
  4460.  10,Constraints,
  4461.         REFERENCES user.table column, column,...
  4462.  11,Constraints,
  4463.      CONSTRAINT constraint_name
  4464.  12,Constraints,
  4465.      CHECK condition CONSTRAINT constraint_name
  4466.  13,Constraints,
  4467.  
  4468.  14,Constraints,
  4469.  Column Constraint Syntax:
  4470.  15,Constraints,
  4471.  
  4472.  16,Constraints,
  4473.      column NULL | NOT NULL  CONSTRAINT constraint_name
  4474.  17,Constraints,
  4475.      UNIQUE | PRIMARY KEY  CONSTRAINT constraint_name
  4476.  18,Constraints,
  4477.      REFERENCES user.table column  CONSTRAINT constraint_name
  4478.  19,Constraints,
  4479.      CHECK condition CONSTRAINT constraint_name
  4480.  20,Constraints,
  4481.  
  4482.  21,Constraints,
  4483.  
  4484.  22,Constraints,
  4485.  A constraint clause restricts the range of valid values for one column
  4486.  23,Constraints,
  4487.  (a column constraint) or for a group of columns (a table constraint).
  4488.  24,Constraints,
  4489.  Any INSERT, UPDATE, or DELETE statement evaluates a relevant constraint;
  4490.  25,Constraints,
  4491.  the constraint must be satisfied for the statement to succeed.
  4492.  26,Constraints,
  4493.  
  4494.  27,Constraints,
  4495.  Table constraint definitions are part of the global table definition,
  4496.  28,Constraints,
  4497.  as in:    CREATE TABLE project_employee (PROJECT NUMBER,
  4498.  29,Constraints,
  4499.            EMPLOYEE NUMBER, PRIMARY KEY (PROJECT, EMPLOYEE))
  4500.  30,Constraints,
  4501.  
  4502.  31,Constraints,
  4503.  Column constraints are local to a specific column, as in:
  4504.  32,Constraints,
  4505.            CREATE TABLE dept (DEPTNO NUMBER PRIMARY KEY,...)
  4506.  33,Constraints,
  4507.  
  4508.  34,Constraints,
  4509.  Constraints must be used in CREATE TABLE or ALTER TABLE.  Use ALTER TABLE
  4510.  35,Constraints,
  4511.  to add or drop constraints from a table.  Constraints are recorded in the
  4512.  36,Constraints,
  4513.  data dictionary.  If you don't name a constraint, it is assigned the name
  4514.  37,Constraints,
  4515.  SYS_Cn, where n is an integer that makes the name unique in the database.
  4516.  38,Constraints,
  4517.  
  4518.  39,Constraints,
  4519.  
  4520.  40,Constraints,
  4521.      column
  4522.  41,Constraints,
  4523.          is the name of a column to which the constraint applies.
  4524.  42,Constraints,
  4525.  
  4526.  43,Constraints,
  4527.      NULL or NOT NULL
  4528.  44,Constraints,
  4529.          enables or prohibits a column from containing null values.
  4530.  45,Constraints,
  4531.  
  4532.  46,Constraints,
  4533.     UNIQUE
  4534.  47,Constraints,
  4535.          each row must have a distinct value for the column; each column
  4536.  48,Constraints,
  4537.          must be declared NOT NULL; the column must not be a PRIMARY KEY.
  4538.  49,Constraints,
  4539.  
  4540.  50,Constraints,
  4541.      PRIMARY KEY
  4542.  51,Constraints,
  4543.          specifies the column as the primary key.
  4544.  52,Constraints,
  4545.  
  4546.  53,Constraints,
  4547.      FOREIGN KEY column, column... REFERENCES user.table column, column...
  4548.  54,Constraints,
  4549.          specifies the column(s) as a foreign key of user.table column.
  4550.  55,Constraints,
  4551.          Default column(s) = the table's primary key.  Details below.
  4552.  56,Constraints,
  4553.  
  4554.  57,Constraints,
  4555.      CHECK condition
  4556.  58,Constraints,
  4557.          sets a condition the column must satisfy to exist in the table.
  4558.  59,Constraints,
  4559.          In a column CHECK constraint, the condition may only refer to the
  4560.  60,Constraints,
  4561.          column to which the constraint belongs.  A table CHECK constraint
  4562.  61,Constraints,
  4563.          condition may refer to multiple columns.
  4564.  62,Constraints,
  4565.  
  4566.  63,Constraints,
  4567.  
  4568.  64,Constraints,
  4569.  The FOREIGN KEY/REFERENCES constraint:
  4570.  65,Constraints,
  4571.  
  4572.  66,Constraints,
  4573.    - rejects an INSERT or UPDATE of a value if a corresponding value does
  4574.  67,Constraints,
  4575.          not currently exist in the primary key table;
  4576.  68,Constraints,
  4577.  
  4578.  69,Constraints,
  4579.    - rejects a DELETE if it would invalidate a REFERENCES constraint;
  4580.  70,Constraints,
  4581.  
  4582.  71,Constraints,
  4583.    - must reference a PRIMARY KEY or UNIQUE column(s) in primary key table;
  4584.  72,Constraints,
  4585.  
  4586.  73,Constraints,
  4587.   - will reference the PRIMARY KEY of the primary key table if no column
  4588.  74,Constraints,
  4589.          or group of columns is specified in the constraint;
  4590.  75,Constraints,
  4591.  
  4592.  76,Constraints,
  4593.    - must reference a table, not a view or cluster;
  4594.  77,Constraints,
  4595.  
  4596.  78,Constraints,
  4597.    - requires that you own the primary key table, have REFERENCE privilege
  4598.  79,Constraints,
  4599.          on it, or have column-level REFERENCE privilege on the referenced
  4600.  80,Constraints,
  4601.          columns in the primary key table;
  4602.  81,Constraints,
  4603.  
  4604.  82,Constraints,
  4605.   - doesn't restrict how other constraints may reference the same tables;
  4606.  83,Constraints,
  4607.  
  4608.  84,Constraints,
  4609.    - requires that the foreign key column(s) and the constraint column(s)
  4610.  85,Constraints,
  4611.          have matching datatypes;
  4612.  86,Constraints,
  4613.  
  4614.  87,Constraints,
  4615.    - may reference the same table named in the CREATE TABLE statement;
  4616.  88,Constraints,
  4617.  
  4618.  89,Constraints,
  4619.    - must not reference the same column more than once (in one constraint).
  4620.  90,Constraints,
  4621.  
  4622.  91,Constraints,
  4623.  
  4624.  92,Constraints,
  4625.  See also: tables, keys, nulls, create table, commands, menu.
  4626.   1,Conversion Functions,
  4627.  
  4628.   2,Conversion Functions,
  4629.  
  4630.   3,Conversion Functions,
  4631.                           Conversion Functions
  4632.   4,Conversion Functions,
  4633.  
  4634.   5,Conversion Functions,
  4635.  SQL Conversion functions convert a value from one datatype to another:
  4636.   6,Conversion Functions,
  4637.  
  4638.   7,Conversion Functions,
  4639.  TO_CHAR(expr, fmt)   Turns a number or date expr into characters shown
  4640.   8,Conversion Functions,
  4641.                          in the format specified by fmt (optional).
  4642.   9,Conversion Functions,
  4643.  TO_DATE(char, fmt)   Turns a char date in fmt format into a date value.
  4644.  10,Conversion Functions,
  4645.  TO_NUMBER(char)      Turns a CHAR number into its NUMBER datatype value.
  4646.  11,Conversion Functions,
  4647.  
  4648.  12,Conversion Functions,
  4649.  CHARTOROWID(char)    Turns character values in char into ROWID values.
  4650.  13,Conversion Functions,
  4651.  ROWIDTOCHAR(ROWID)   Turns ROWID values into character values.
  4652.  14,Conversion Functions,
  4653.  
  4654.  15,Conversion Functions,
  4655.  CONVERT(char,        Converts char to a new character set implementation
  4656.  16,Conversion Functions,
  4657.     new, source)         from its source implementation.
  4658.  17,Conversion Functions,
  4659.  
  4660.  18,Conversion Functions,
  4661.  HEXTORAW(char)       Turns char hexadecimal digits into binary (raw).
  4662.  19,Conversion Functions,
  4663.  RAWTOHEX(raw)        Turns raw (binary) into character (hex) values.
  4664.  20,Conversion Functions,
  4665.  
  4666.  21,Conversion Functions,
  4667.  
  4668.  22,Conversion Functions,
  4669.  See also: char, date, number, implicit conversions, pseudo-columns,
  4670.  23,Conversion Functions,
  4671.            format numbers, format dates, format modifiers, menu.
  4672.   1,Correlated Subquery,
  4673.  
  4674.   2,Correlated Subquery,
  4675.  
  4676.   3,Correlated Subquery,
  4677.                           Correlated Subquery
  4678.   4,Correlated Subquery,
  4679.  
  4680.   5,Correlated Subquery,
  4681.  A correlated subquery evaluates a query for EVERY ROW in the parent
  4682.   6,Correlated Subquery,
  4683.  statement.  Use a table or alias name with each column for clarity:
  4684.   7,Correlated Subquery,
  4685.  
  4686.   8,Correlated Subquery,
  4687.      SELECT column_list  FROM table1 alias1  WHERE expr operator
  4688.   9,Correlated Subquery,
  4689.         (SELECT column_list
  4690.  10,Correlated Subquery,
  4691.          FROM table2 alias2
  4692.  11,Correlated Subquery,
  4693.          WHERE alias1.column operator alias2.column);
  4694.  12,Correlated Subquery,
  4695.  
  4696.  13,Correlated Subquery,
  4697.      UPDATE column_list  SET column =
  4698.  14,Correlated Subquery,
  4699.         (SELECT expr
  4700.  15,Correlated Subquery,
  4701.          FROM table2 alias2
  4702.  16,Correlated Subquery,
  4703.          WHERE alias1.column = alias2.column);
  4704.  17,Correlated Subquery,
  4705.  
  4706.  18,Correlated Subquery,
  4707.      DELETE FROM table1 alias1 WHERE column operator
  4708.  19,Correlated Subquery,
  4709.         (SELECT expr
  4710.  20,Correlated Subquery,
  4711.          FROM table2 alias2
  4712.  21,Correlated Subquery,
  4713.          WHERE alias1.column = alias2.column);
  4714.  22,Correlated Subquery,
  4715.  
  4716.  23,Correlated Subquery,
  4717.  See also: example correlated subquery, example delete, query, alias,
  4718.  24,Correlated Subquery,
  4719.            select, where, update, delete, uses of select, menu.
  4720.   1,Cursor Attributes,
  4721.  
  4722.   2,Cursor Attributes,
  4723.  
  4724.   3,Cursor Attributes,
  4725.                                      Cursor Attributes
  4726.   4,Cursor Attributes,
  4727.  
  4728.   5,Cursor Attributes,
  4729.   Expression            Cursor opened;     Last FETCH      Last FETCH
  4730.   6,Cursor Attributes,
  4731.                         before 1st FETCH   returned row    returned no row
  4732.   7,Cursor Attributes,
  4733.  ---------------------------------------------------------------------------
  4734.   8,Cursor Attributes,
  4735.   cursor_name%FOUND     Returns NULL       Returns TRUE    Returns FALSE
  4736.   9,Cursor Attributes,
  4737.  
  4738.  10,Cursor Attributes,
  4739.   cursor_name%NOTFOUND  Returns NULL       Returns FALSE   Returns TRUE
  4740.  11,Cursor Attributes,
  4741.  
  4742.  12,Cursor Attributes,
  4743.   cursor_name%ROWCOUNT  Returns a 0        Returns total 
  4744.  13,Cursor Attributes,
  4745.                                            number of rows
  4746.  14,Cursor Attributes,
  4747.                                            FETCHed since
  4748.  15,Cursor Attributes,
  4749.                                            OPEN (cumulative)
  4750.  16,Cursor Attributes,
  4751.   cursor_name%ISOPEN    Returns TRUE
  4752.  17,Cursor Attributes,
  4753.                         if cursor is
  4754.  18,Cursor Attributes,
  4755.                         OPEN, FALSE
  4756.  19,Cursor Attributes,
  4757.                         if closed
  4758.  20,Cursor Attributes,
  4759.  
  4760.  21,Cursor Attributes,
  4761.  
  4762.  22,Cursor Attributes,
  4763.  %FOUND, %NOTFOUND, and %ROWCOUNT raise the INVALID_CURSOR exception
  4764.  23,Cursor Attributes,
  4765.  (ORA-01001) if the cursor is not OPEN.
  4766.  24,Cursor Attributes,
  4767.  
  4768.  25,Cursor Attributes,
  4769.  See also: open, fetch, nulls, cursors, error handling,
  4770.  26,Cursor Attributes,
  4771.            attributes (%type and %rowtype), commands, menu.
  4772.   1,Cursor FOR,
  4773.  
  4774.   2,Cursor FOR,
  4775.  
  4776.   3,Cursor FOR,
  4777.                              Cursor FOR
  4778.   4,Cursor FOR,
  4779.                                                     PL/SQL statement
  4780.   5,Cursor FOR,
  4781.  
  4782.   6,Cursor FOR,
  4783.  FOR record_name IN cursor_name(parameter, parameter,...) LOOP
  4784.   7,Cursor FOR,
  4785.     sequence_of_statements
  4786.   8,Cursor FOR,
  4787.  END LOOP;
  4788.   9,Cursor FOR,
  4789.  
  4790.  10,Cursor FOR,
  4791.  In a cursor FOR loop, PL/SQL issues an implicit  OPEN cursor at the
  4792.  11,Cursor FOR,
  4793.  beginning, then an implicit FETCH cursor INTO record_name for every
  4794.  12,Cursor FOR,
  4795.  row that satisfies the query associated with cursor_name, executing
  4796.  13,Cursor FOR,
  4797.  the sequence_of_statements.  When no rows are left to fetch, PL/SQL
  4798.  14,Cursor FOR,
  4799.  issues an implicit CLOSE cursor and exits the loop. The cursor_name
  4800.  15,Cursor FOR,
  4801.  must be previously declared and closed as the loop begins. Optional
  4802.  16,Cursor FOR,
  4803.  parameter values are used as the cursor is implicitly opened before
  4804.  17,Cursor FOR,
  4805.  the loop's first execution.  Parameter datatypes must be compatible
  4806.  18,Cursor FOR,
  4807.  or convertible to previously declared cursor parameter datatypes.
  4808.  19,Cursor FOR,
  4809.  
  4810.  20,Cursor FOR,
  4811.  Record_name is implicitly declared as cursor_name%ROWTYPE datatype.
  4812.  21,Cursor FOR,
  4813.  You reference the returned values by record_name.column_name.
  4814.  22,Cursor FOR,
  4815.  
  4816.  23,Cursor FOR,
  4817.  For other loops see: loop, while, numeric for.
  4818.  24,Cursor FOR,
  4819.  See also: example cursor for, open, fetch, implicit conversions,
  4820.  25,Cursor FOR,
  4821.            attributes, managing cursors, commands, menu.
  4822.   1,Cursors,
  4823.  
  4824.   2,Cursors,
  4825.  
  4826.   3,Cursors,
  4827.                               Cursors
  4828.   4,Cursors,
  4829.  
  4830.   5,Cursors,
  4831.  The cursor is a PL/SQL work area that holds the row currently being
  4832.   6,Cursors,
  4833.  processed.  The topics below describe cursor control during UPDATE,
  4834.   7,Cursors,
  4835.  INSERT, and DELETE operations.  Type help, a space, and then the
  4836.   8,Cursors,
  4837.  topic you want to see:
  4838.   9,Cursors,
  4839.  
  4840.  10,Cursors,
  4841.         declare cursor
  4842.  11,Cursors,
  4843.         open
  4844.  12,Cursors,
  4845.         fetch
  4846.  13,Cursors,
  4847.         close
  4848.  14,Cursors,
  4849.         cursor for loops
  4850.  15,Cursors,
  4851.         cursor attributes (explicit)
  4852.  16,Cursors,
  4853.         sql% cursor (implicit)
  4854.  17,Cursors,
  4855.         where current of
  4856.  18,Cursors,
  4857.  
  4858.  19,Cursors,
  4859.  
  4860.  20,Cursors,
  4861.  See also: update, insert, delete, menu.
  4862.   1,DATE,
  4863.  
  4864.   2,DATE,
  4865.  
  4866.   3,DATE,
  4867.                                 DATE
  4868.   4,DATE,
  4869.  DATE
  4870.   5,DATE,
  4871.  
  4872.   6,DATE,
  4873.  For each date value, a DATE column stores the century, year, month,
  4874.   7,DATE,
  4875.  day, hour, minute, and second. The 24-hour format is used for time.
  4876.   8,DATE,
  4877.  
  4878.   9,DATE,
  4879.  Defaults: If you insert a date with no time:  00:00:00 midnight
  4880.  10,DATE,
  4881.            If you insert a time with no date:  current date (SYSDATE)
  4882.  11,DATE,
  4883.            If you don't specify a date format: DD-MON-YY ('09-JAN-42')
  4884.  12,DATE,
  4885.  
  4886.  13,DATE,
  4887.  You can add and subtract numbers to and from dates, and subtract
  4888.  14,DATE,
  4889.  dates from dates:  SYSDATE + 1 = tomorrow;
  4890.  15,DATE,
  4891.                     SYSDATE - HIREDATE = total days employed
  4892.  16,DATE,
  4893.  
  4894.  17,DATE,
  4895.  
  4896.  18,DATE,
  4897.  The appearance of dates in reports is controlled by date functions,
  4898.  19,DATE,
  4899.  date formats, and modifiers of date formats.
  4900.  20,DATE,
  4901.  
  4902.  21,DATE,
  4903.  
  4904.  22,DATE,
  4905.  See also: date functions, format dates, format modifiers, char, number,
  4906.  23,DATE,
  4907.            boolean, raw, menu.
  4908.   1,DBA,
  4909.  
  4910.   2,DBA,
  4911.  
  4912.   3,DBA,
  4913.                                      DBA
  4914.   4,DBA,
  4915.  
  4916.   5,DBA,
  4917.  DBA username SYSTEM owns and has all privileges on PRODUCT_USER_PROFILE.
  4918.   6,DBA,
  4919.  Other users should have only SELECT access to this table.  Command file
  4920.   7,DBA,
  4921.  PUPBLD, when run, grants SELECT access on PRODUCT_USER_PROFILE to PUBLIC.
  4922.   8,DBA,
  4923.  
  4924.   9,DBA,
  4925.  To disable a SQL or SQL*Plus command for a given user, the DBA inserts a
  4926.  10,DBA,
  4927.  row with the username in the USERID column, the command in the ATTRIBUTE
  4928.  11,DBA,
  4929.  column, and DISABLED in the CHAR_VALUE column.  The SCOPE, NUMERIC_VALUE,
  4930.  12,DBA,
  4931.  and DATE_VALUE columns should contain null.  For example:
  4932.  13,DBA,
  4933.  
  4934.  14,DBA,
  4935.                                              NUMERIC   CHAR      DATE
  4936.  15,DBA,
  4937.       PRODUCT    USERID   ATTRIBUTE   SCOPE  VALUE     VALUE     VALUE
  4938.  16,DBA,
  4939.       --------   ------   ---------   -----  -------   --------  -----
  4940.  17,DBA,
  4941.       SQL*Plus   SCOTT    HOST                         DISABLED
  4942.  18,DBA,
  4943.       SQL*Plus   %        INSERT                       DISABLED
  4944.  19,DBA,
  4945.       SQL*Plus   %        UPDATE                       DISABLED
  4946.  20,DBA,
  4947.       SQL*Plus   %        DELETE                       DISABLED
  4948.  21,DBA,
  4949.  
  4950.  22,DBA,
  4951.  
  4952.  23,DBA,
  4953.  To re-enable a command, the DBA deletes the row with the restriction.
  4954.  24,DBA,
  4955.  
  4956.  25,DBA,
  4957.  The DBA can use the PRODUCT_USER_PROFILE table to disable the following:
  4958.  26,DBA,
  4959.  
  4960.  27,DBA,
  4961.       SQL*Plus Commands          SQL Commands
  4962.  28,DBA,
  4963.       -----------------          ------------------------------
  4964.  29,DBA,
  4965.       CONNECT    QUIT            ALTER      DROP       RENAME
  4966.  30,DBA,
  4967.       EDIT       RUN             AUDIT      GRANT      REVOKE
  4968.  31,DBA,
  4969.       EXIT       SAVE            CONNECT    INSERT     SELECT
  4970.  32,DBA,
  4971.       GET        SPOOL           CREATE     LOCK       UPDATE
  4972.  33,DBA,
  4973.       HOST       START           DELETE     NOAUDIT    VALIDATE
  4974.  34,DBA,
  4975.  
  4976.  35,DBA,
  4977.  Columns in the PRODUCT_USER_PROFILE table:
  4978.  36,DBA,
  4979.  
  4980.  37,DBA,
  4981.      PRODUCT contains the product name (SQL*Plus in this case).  Wildcards
  4982.  38,DBA,
  4983.          and nulls are not permitted.
  4984.  39,DBA,
  4985.  
  4986.  40,DBA,
  4987.      USERID contains the username (in CAPITALS) for whom the command is
  4988.  41,DBA,
  4989.          being disabled.  To disable the command for more than one user,
  4990.  42,DBA,
  4991.          use the % SQL wildcard or make multiple entries.
  4992.  43,DBA,
  4993.  
  4994.  44,DBA,
  4995.      ATTRIBUTE contains the command (in CAPITALS) being disabled.
  4996.  45,DBA,
  4997.          Wildcards are not permitted.
  4998.  46,DBA,
  4999.  
  5000.  47,DBA,
  5001.      SCOPE is ignored for SQL*Plus.  We recommend a NULL here.
  5002.  48,DBA,
  5003.  
  5004.  49,DBA,
  5005.      NUMERIC_VALUE is ignored for SQL*Plus.  We recommend a NULL here.
  5006.  50,DBA,
  5007.  
  5008.  51,DBA,
  5009.      CHAR_VALUE must contain "DISABLED".  Wildcards are not permitted.
  5010.  52,DBA,
  5011.  
  5012.  53,DBA,
  5013.      DATE_VALUE is ignored for SQL*Plus.  We recommend a NULL here.
  5014.  54,DBA,
  5015.  
  5016.  55,DBA,
  5017.      See also:  commands, menu.
  5018.   1,DECLARE,
  5019.  
  5020.   2,DECLARE,
  5021.                                DECLARE
  5022.   3,DECLARE,
  5023.                                                       PL/SQL statement
  5024.   4,DECLARE,
  5025.  DECLARE
  5026.   5,DECLARE,
  5027.      constant_name CONSTANT datatype;
  5028.   6,DECLARE,
  5029.      variable_name datatype;
  5030.   7,DECLARE,
  5031.      CURSOR cursor_name;
  5032.   8,DECLARE,
  5033.      exception_name EXCEPTION;
  5034.   9,DECLARE,
  5035.  BEGIN
  5036.  10,DECLARE,
  5037.      ...
  5038.  11,DECLARE,
  5039.  
  5040.  12,DECLARE,
  5041.  DECLARE starts declarations of variables and constants which can only
  5042.  13,DECLARE,
  5043.  be referenced in the current block and its sub-blocks, but not by the
  5044.  14,DECLARE,
  5045.  enclosing block.
  5046.  15,DECLARE,
  5047.  
  5048.  16,DECLARE,
  5049.  The DECLARE section is optional.  It ends with a BEGIN statement.
  5050.  17,DECLARE,
  5051.  
  5052.  18,DECLARE,
  5053.  
  5054.  19,DECLARE,
  5055.  See also: example while, variables, char, number, date, exception,
  5056.  20,DECLARE,
  5057.            declare cursor, begin, blocks, commands, menu.
  5058.   1,DECLARE CURSOR,
  5059.  
  5060.   2,DECLARE CURSOR,
  5061.  
  5062.   3,DECLARE CURSOR,
  5063.                            DECLARE CURSOR
  5064.   4,DECLARE CURSOR,
  5065.                                                      PL/SQL statement
  5066.   5,DECLARE CURSOR,
  5067.  DECLARE
  5068.   6,DECLARE CURSOR,
  5069.      CURSOR cursor_name
  5070.   7,DECLARE CURSOR,
  5071.      (parameter_name datatype),...      --optional
  5072.   8,DECLARE CURSOR,
  5073.      IS SELECT_statement
  5074.   9,DECLARE CURSOR,
  5075.      FOR UPDATE OF column_name;         --required if UPDATE or DELETE
  5076.  10,DECLARE CURSOR,
  5077.      ...                                  statements in this block use
  5078.  11,DECLARE CURSOR,
  5079.                                           the WHERE CURRENT OF clause.
  5080.  12,DECLARE CURSOR,
  5081.  
  5082.  13,DECLARE CURSOR,
  5083.  DECLARE CURSOR names a cursor and associates a query with it.  If you
  5084.  14,DECLARE CURSOR,
  5085.  use parameter_names in the declaration, you must also use them in the
  5086.  15,DECLARE CURSOR,
  5087.  SELECT_statement which defines the query associated with cursor_name.
  5088.  16,DECLARE CURSOR,
  5089.  For clarity, make parameter_names different from column names.
  5090.  17,DECLARE CURSOR,
  5091.  
  5092.  18,DECLARE CURSOR,
  5093.  Datatype is CHAR, NUMBER, DATE, or BOOLEAN, with no restrictions.
  5094.  19,DECLARE CURSOR,
  5095.  
  5096.  20,DECLARE CURSOR,
  5097.  
  5098.  21,DECLARE CURSOR,
  5099.  See also: cursors, example cursors, update, delete, where current of,
  5100.  22,DECLARE CURSOR,
  5101.            query, char, number, date, boolean, declare, commands, menu.
  5102.   1,DEFINE,
  5103.  
  5104.   2,DEFINE,
  5105.  
  5106.   3,DEFINE,
  5107.                                    DEFINE
  5108.   4,DEFINE,
  5109.  
  5110.   5,DEFINE,
  5111.  DEF[INE] [ variable ] | [ variable = text ]
  5112.   6,DEFINE,
  5113.  
  5114.   7,DEFINE,
  5115.  DEFINE specifies a user variable and assigns it a CHAR value, or lists
  5116.   8,DEFINE,
  5117.  the value and variable type of a single variable or all variables.
  5118.   9,DEFINE,
  5119.  
  5120.  10,DEFINE,
  5121.      variable
  5122.  11,DEFINE,
  5123.          is the user variable whose value you wish to assign or list.
  5124.  12,DEFINE,
  5125.          Enter DEFINE followed by variable to list the value and type of
  5126.  13,DEFINE,
  5127.          variable.  Enter DEFINE with no clauses to list the values and
  5128.  14,DEFINE,
  5129.          types of all user variables.
  5130.  15,DEFINE,
  5131.  
  5132.  16,DEFINE,
  5133.      variable = text
  5134.  17,DEFINE,
  5135.          defines (names) a user variable and assigns it a CHAR value.
  5136.  18,DEFINE,
  5137.  
  5138.  19,DEFINE,
  5139.      text
  5140.  20,DEFINE,
  5141.          is the CHAR value you wish to assign to variable.  Enclose text in
  5142.  21,DEFINE,
  5143.          'single quotes' if it contains punctuation or blanks.
  5144.  22,DEFINE,
  5145.  
  5146.  23,DEFINE,
  5147.  DEFINEd variables retain their values until you:
  5148.  24,DEFINE,
  5149.  
  5150.  25,DEFINE,
  5151.      -   enter a new DEFINE command referencing the variable, or
  5152.  26,DEFINE,
  5153.      -   enter an UNDEFINE command referencing the variable, or
  5154.  27,DEFINE,
  5155.      -   enter an ACCEPT command referencing the variable, or
  5156.  28,DEFINE,
  5157.      -   reference the variable in the NEW_VALUE or OLD_VALUE clause of
  5158.  29,DEFINE,
  5159.          the COLUMN command, and reference the column in a subsequent SQL
  5160.  30,DEFINE,
  5161.          SELECT statement, or
  5162.  31,DEFINE,
  5163.      -   EXIT SQL*Plus.
  5164.  32,DEFINE,
  5165.  
  5166.  33,DEFINE,
  5167.  When you run a stored query or a command file, SQL*Plus substitutes the
  5168.  34,DEFINE,
  5169.  value of variable for each substitution variable referencing &variable or
  5170.  35,DEFINE,
  5171.  &&variable.  SQL*Plus will not prompt you for the value of variable in
  5172.  36,DEFINE,
  5173.  the session until you UNDEFINE variable.  You can DEFINE a maximum of 240
  5174.  37,DEFINE,
  5175.  variables.  Note that you can use DEFINE to define the _EDITOR variable,
  5176.  38,DEFINE,
  5177.  which establishes the host system editor invoked by the EDIT command.
  5178.  39,DEFINE,
  5179.  
  5180.  40,DEFINE,
  5181.  If you continue the value of a DEFINEd variable on multiple lines with the
  5182.  41,DEFINE,
  5183.  SQL*Plus command continuation character, each continuation character and
  5184.  42,DEFINE,
  5185.  carriage return you enter are replaced with a space in the resulting
  5186.  43,DEFINE,
  5187.  variable.  For example, SQL*Plus interprets
  5188.  44,DEFINE,
  5189.  
  5190.  45,DEFINE,
  5191.      SQL> DEFINE TEXT = 'ONE-
  5192.  46,DEFINE,
  5193.      > TWO-
  5194.  47,DEFINE,
  5195.      > THREE'
  5196.  48,DEFINE,
  5197.  
  5198.  49,DEFINE,
  5199.  as:  SQL> DEFINE TEXT = 'ONE TWO THREE'
  5200.  50,DEFINE,
  5201.  
  5202.  51,DEFINE,
  5203.  Examples: To assign the value MANAGER to the variable POS, enter:
  5204.  52,DEFINE,
  5205.  
  5206.  53,DEFINE,
  5207.                SQL> DEFINE POS = MANAGER
  5208.  54,DEFINE,
  5209.  
  5210.  55,DEFINE,
  5211.            If you execute a command with a reference to &POS, SQL*Plus
  5212.  56,DEFINE,
  5213.            substitutes the value MANAGER for &POS, and will not prompt you
  5214.  57,DEFINE,
  5215.            for a POS value.  To assign the CHAR value 20 to the variable
  5216.  58,DEFINE,
  5217.            DEPTNO, enter:
  5218.  59,DEFINE,
  5219.  
  5220.  60,DEFINE,
  5221.                SQL> DEFINE DEPTNO = 20
  5222.  61,DEFINE,
  5223.  
  5224.  62,DEFINE,
  5225.            Even though you enter the number 20, SQL*Plus assigns a CHAR
  5226.  63,DEFINE,
  5227.            value to DEPTNO consisting of two characters, 2 and 0.  To see
  5228.  64,DEFINE,
  5229.            the definition of DEPTNO, enter:
  5230.  65,DEFINE,
  5231.  
  5232.  66,DEFINE,
  5233.                SQL> DEFINE DEPTNO
  5234.  67,DEFINE,
  5235.  
  5236.  68,DEFINE,
  5237.            Result:
  5238.  69,DEFINE,
  5239.  
  5240.  70,DEFINE,
  5241.                DEFINE DEPTNO = "20" (CHAR)
  5242.  71,DEFINE,
  5243.  
  5244.  72,DEFINE,
  5245.  
  5246.  73,DEFINE,
  5247.  See also: accept, column, edit, parameters, undefine, commands, menu.
  5248.   1,DEL,
  5249.  
  5250.   2,DEL,
  5251.  
  5252.   3,DEL,
  5253.                                      DEL
  5254.   4,DEL,
  5255.  
  5256.   5,DEL,
  5257.  DEL
  5258.   6,DEL,
  5259.  
  5260.   7,DEL,
  5261.  DEL deletes the current line of the buffer, making the following line of
  5262.   8,DEL,
  5263.  the buffer (if any) the current line.  To delete several consecutive
  5264.   9,DEL,
  5265.  lines, enter DEL several times.
  5266.  10,DEL,
  5267.  
  5268.  11,DEL,
  5269.  
  5270.  12,DEL,
  5271.  Examples: The SQL buffer contains the following query:
  5272.  13,DEL,
  5273.  
  5274.  14,DEL,
  5275.                SQL> LIST
  5276.  15,DEL,
  5277.                  1  SELECT ENAME, DEPTNO
  5278.  16,DEL,
  5279.                  2  FROM EMP
  5280.  17,DEL,
  5281.                  3  WHERE JOB = 'SALESMAN'
  5282.  18,DEL,
  5283.                  4* ORDER BY DEPTNO
  5284.  19,DEL,
  5285.  
  5286.  20,DEL,
  5287.            To make the line with the WHERE clause the current line, enter:
  5288.  21,DEL,
  5289.  
  5290.  22,DEL,
  5291.                SQL> LIST 3
  5292.  23,DEL,
  5293.                  3* WHERE JOB = 'SALESMAN'
  5294.  24,DEL,
  5295.  
  5296.  25,DEL,
  5297.            To delete the WHERE clause, enter:
  5298.  26,DEL,
  5299.  
  5300.  27,DEL,
  5301.                SQL> DEL
  5302.  28,DEL,
  5303.  
  5304.  29,DEL,
  5305.            The SQL buffer now contains:
  5306.  30,DEL,
  5307.  
  5308.  31,DEL,
  5309.                SQL> LIST
  5310.  32,DEL,
  5311.                  1  SELECT ENAME, DEPTNO
  5312.  33,DEL,
  5313.                  2  FROM EMP
  5314.  34,DEL,
  5315.                  3* ORDER BY DEPTNO
  5316.  35,DEL,
  5317.  
  5318.  36,DEL,
  5319.  
  5320.  37,DEL,
  5321.  See also: append, change, edit, input, list, save, set (buffer), spool,
  5322.  38,DEL,
  5323.            commands, menu.
  5324.   1,DELETE,
  5325.  
  5326.   2,DELETE,
  5327.  
  5328.   3,DELETE,
  5329.                               DELETE
  5330.   4,DELETE,
  5331.  
  5332.   5,DELETE,
  5333.  SQL version:                       PL/SQL version:
  5334.   6,DELETE,
  5335.  
  5336.   7,DELETE,
  5337.  DELETE FROM table_or_view          DELETE FROM table_or_view
  5338.   8,DELETE,
  5339.     WHERE clause;                      WHERE CURRENT OF cursor_name;
  5340.   9,DELETE,
  5341.  
  5342.  10,DELETE,
  5343.  
  5344.  11,DELETE,
  5345.  DELETE removes one or more rows from the table or view you specify.
  5346.  12,DELETE,
  5347.  The WHERE clause specifies the rows to remove.  To remove all rows,
  5348.  13,DELETE,
  5349.  omit the WHERE clause.
  5350.  14,DELETE,
  5351.  
  5352.  15,DELETE,
  5353.  In PL/SQL, use  DELETE with the WHERE CURRENT OF cursor_name clause
  5354.  16,DELETE,
  5355.  to remove only the current row--the one last accessed with a FETCH.
  5356.  17,DELETE,
  5357.  
  5358.  18,DELETE,
  5359.  Use the implicit SQL% cursor and explicit cursor attributes to gain
  5360.  19,DELETE,
  5361.  information about the execution of a PL/SQL DELETE statement.
  5362.  20,DELETE,
  5363.  
  5364.  21,DELETE,
  5365.  See also: example delete, where, where current of, sql% cursor,
  5366.  22,DELETE,
  5367.            cursor attributes, bnf syntax, examples, menu.
  5368.   1,DESCRIBE,
  5369.  
  5370.   2,DESCRIBE,
  5371.  
  5372.   3,DESCRIBE,
  5373.                                   DESCRIBE
  5374.   4,DESCRIBE,
  5375.  
  5376.   5,DESCRIBE,
  5377.  DESC[RIBE] [user.] object [@database_link_name]
  5378.   6,DESCRIBE,
  5379.  
  5380.   7,DESCRIBE,
  5381.  DESCRIBE lists the column definitions for a table, view, or synonym.
  5382.   8,DESCRIBE,
  5383.  
  5384.   9,DESCRIBE,
  5385.      user
  5386.  10,DESCRIBE,
  5387.          is the owner of the object.  Omit user if you own the object.
  5388.  11,DESCRIBE,
  5389.  
  5390.  12,DESCRIBE,
  5391.      object
  5392.  13,DESCRIBE,
  5393.          is a table, view, or synonym.
  5394.  14,DESCRIBE,
  5395.  
  5396.  15,DESCRIBE,
  5397.      database_link_name
  5398.  16,DESCRIBE,
  5399.          is the node name and database where object exists.  The syntax
  5400.  17,DESCRIBE,
  5401.          depends on the SQL*Net your computer uses.  See LINKS for more
  5402.  18,DESCRIBE,
  5403.          information on database links.
  5404.  19,DESCRIBE,
  5405.  
  5406.  20,DESCRIBE,
  5407.  For each column, the description lists:
  5408.  21,DESCRIBE,
  5409.  
  5410.  22,DESCRIBE,
  5411.      -   the column's name
  5412.  23,DESCRIBE,
  5413.      -   whether null values are allowed (NULL or NOT NULL) for the column
  5414.  24,DESCRIBE,
  5415.      -   the column's datatype
  5416.  25,DESCRIBE,
  5417.      -   the column's precision (and scale, if any, for a numeric column)
  5418.  26,DESCRIBE,
  5419.  
  5420.  27,DESCRIBE,
  5421.  
  5422.  28,DESCRIBE,
  5423.  Example:  To describe the EMP table, enter:
  5424.  29,DESCRIBE,
  5425.  
  5426.  30,DESCRIBE,
  5427.            SQL> DESCRIBE EMP
  5428.  31,DESCRIBE,
  5429.  
  5430.  32,DESCRIBE,
  5431.        Output:  Name        Null?      Type
  5432.  33,DESCRIBE,
  5433.                 ----------  --------   -----------
  5434.  34,DESCRIBE,
  5435.                 EMPNO       NOT NULL   NUMBER(4)
  5436.  35,DESCRIBE,
  5437.                 ENAME                  CHAR(10)
  5438.  36,DESCRIBE,
  5439.                 JOB                    CHAR(9)
  5440.  37,DESCRIBE,
  5441.                 MGR                    NUMBER(4)
  5442.  38,DESCRIBE,
  5443.                 HIREDATE               DATE
  5444.  39,DESCRIBE,
  5445.                 SAL                    NUMBER(7,2)
  5446.  40,DESCRIBE,
  5447.                 COMM                   NUMBER(7,2)
  5448.  41,DESCRIBE,
  5449.                 DEPTNO                 NUMBER(2)
  5450.  42,DESCRIBE,
  5451.  
  5452.  43,DESCRIBE,
  5453.  
  5454.  44,DESCRIBE,
  5455.  See also: links, tables, views (and indexes), commands, menu.
  5456.   1,DISCONNECT,
  5457.  
  5458.   2,DISCONNECT,
  5459.  
  5460.   3,DISCONNECT,
  5461.                                  DISCONNECT
  5462.   4,DISCONNECT,
  5463.  
  5464.   5,DISCONNECT,
  5465.  DISC[ONNECT]
  5466.   6,DISCONNECT,
  5467.  
  5468.   7,DISCONNECT,
  5469.  DISCONNECT commits pending changes to the database and logs the current
  5470.   8,DISCONNECT,
  5471.  user off ORACLE, but does not exit SQL*Plus.  Use EXIT or QUIT to log off
  5472.   9,DISCONNECT,
  5473.  ORACLE and return control to your host computer's operating system.
  5474.  10,DISCONNECT,
  5475.  
  5476.  11,DISCONNECT,
  5477.  
  5478.  12,DISCONNECT,
  5479.  Example:  Your command file might begin with a CONNECT command and end
  5480.  13,DISCONNECT,
  5481.            with a DISCONNECT:
  5482.  14,DISCONNECT,
  5483.  
  5484.  15,DISCONNECT,
  5485.                SQL> GET MYFILE
  5486.  16,DISCONNECT,
  5487.                  1  CONNECT ...
  5488.  17,DISCONNECT,
  5489.                     .
  5490.  18,DISCONNECT,
  5491.                     .
  5492.  19,DISCONNECT,
  5493.                     .
  5494.  20,DISCONNECT,
  5495.                 15* DISCONNECT
  5496.  21,DISCONNECT,
  5497.  
  5498.  22,DISCONNECT,
  5499.  
  5500.  23,DISCONNECT,
  5501.  See also: connect, exit, host, quit, SQLPlus, commands, menu.
  5502.   1,DROP CLUSTER,
  5503.  
  5504.   2,DROP CLUSTER,
  5505.  
  5506.   3,DROP CLUSTER,
  5507.                                 DROP CLUSTER
  5508.   4,DROP CLUSTER,
  5509.                                                              SQL statement
  5510.   5,DROP CLUSTER,
  5511.  DROP CLUSTER user.cluster INCLUDING TABLES
  5512.   6,DROP CLUSTER,
  5513.  
  5514.   7,DROP CLUSTER,
  5515.  DROP CLUSTER removes the specified cluster from the database.  Dropping a
  5516.   8,DROP CLUSTER,
  5517.  cluster also drops the cluster index and returns all cluster space to the
  5518.   9,DROP CLUSTER,
  5519.  appropriate tablespace(s).  You need DBA privileges to drop a cluster that
  5520.  10,DROP CLUSTER,
  5521.  was created by another user.
  5522.  11,DROP CLUSTER,
  5523.  
  5524.  12,DROP CLUSTER,
  5525.      INCLUDING TABLES
  5526.  13,DROP CLUSTER,
  5527.          drops all tables that belong to the cluster.  If omitted, the
  5528.  14,DROP CLUSTER,
  5529.          tables must have been dropped before you can drop the cluster.
  5530.  15,DROP CLUSTER,
  5531.  
  5532.  16,DROP CLUSTER,
  5533.  Dropping a clustered table also removes it from the cluster.  You cannot
  5534.  17,DROP CLUSTER,
  5535.  uncluster an individual table; to get the same result, create a new table
  5536.  18,DROP CLUSTER,
  5537.  like the old one, but without the CLUSTER option:
  5538.  19,DROP CLUSTER,
  5539.  
  5540.  20,DROP CLUSTER,
  5541.                CREATE TABLE new AS SELECT * FROM old
  5542.  21,DROP CLUSTER,
  5543.  
  5544.  22,DROP CLUSTER,
  5545.      Then drop the old table:   DROP TABLE old
  5546.  23,DROP CLUSTER,
  5547.      and rename the new table:  RENAME new TO old
  5548.  24,DROP CLUSTER,
  5549.  
  5550.  25,DROP CLUSTER,
  5551.  See also: drop table, create cluster, alter cluster, commands, menu.
  5552.   1,DROP DATABASE LINK,
  5553.  
  5554.   2,DROP DATABASE LINK,
  5555.  
  5556.   3,DROP DATABASE LINK,
  5557.                              DROP DATABASE LINK
  5558.   4,DROP DATABASE LINK,
  5559.                                                            SQL statement
  5560.   5,DROP DATABASE LINK,
  5561.  DROP PUBLIC DATABASE LINK link_name
  5562.   6,DROP DATABASE LINK,
  5563.  
  5564.   7,DROP DATABASE LINK,
  5565.  
  5566.   8,DROP DATABASE LINK,
  5567.  DROP DATABASE LINK removes the specified database link.  PUBLIC must be
  5568.   9,DROP DATABASE LINK,
  5569.  included if the database link is accessible to all users; you must have
  5570.  10,DROP DATABASE LINK,
  5571.  DBA privileges to use the PUBLIC clause, or to drop a database link that
  5572.  11,DROP DATABASE LINK,
  5573.  you do not own.
  5574.  12,DROP DATABASE LINK,
  5575.  
  5576.  13,DROP DATABASE LINK,
  5577.  
  5578.  14,DROP DATABASE LINK,
  5579.  See also: links, remote databases, create db link, commands, menu.
  5580.   1,DROP INDEX,
  5581.  
  5582.   2,DROP INDEX,
  5583.  
  5584.   3,DROP INDEX,
  5585.                                  DROP INDEX
  5586.   4,DROP INDEX,
  5587.                                                            SQL statement
  5588.   5,DROP INDEX,
  5589.  DROP INDEX user.index
  5590.   6,DROP INDEX,
  5591.  
  5592.   7,DROP INDEX,
  5593.  
  5594.   8,DROP INDEX,
  5595.  DROP INDEX removes the specified index from the database.  You must own
  5596.   9,DROP INDEX,
  5597.  an index to drop it, unless you have DBA privileges.  If user is omitted,
  5598.  10,DROP INDEX,
  5599.  the user issuing DROP INDEX is assumed.
  5600.  11,DROP INDEX,
  5601.  
  5602.  12,DROP INDEX,
  5603.  When an index is dropped, all blocks allocated to it are returned to the
  5604.  13,DROP INDEX,
  5605.  index's tablespace.
  5606.  14,DROP INDEX,
  5607.  
  5608.  15,DROP INDEX,
  5609.  
  5610.  16,DROP INDEX,
  5611.  See also: alter index, create index, create table, commands, menu.
  5612.   1,DROP ROLLBACK SEGMENT,
  5613.  
  5614.   2,DROP ROLLBACK SEGMENT,
  5615.  
  5616.   3,DROP ROLLBACK SEGMENT,
  5617.                             DROP ROLLBACK SEGMENT
  5618.   4,DROP ROLLBACK SEGMENT,
  5619.                                                              SQL statement
  5620.   5,DROP ROLLBACK SEGMENT,
  5621.  DROP PUBLIC ROLLBACK SEGMENT segment
  5622.   6,DROP ROLLBACK SEGMENT,
  5623.  
  5624.   7,DROP ROLLBACK SEGMENT,
  5625.  DROP ROLLBACK SEGMENT removes the specified rollback segment.  The PUBLIC
  5626.   8,DROP ROLLBACK SEGMENT,
  5627.  clause must be included if the rollback segment is public.  Only a DBA can
  5628.   9,DROP ROLLBACK SEGMENT,
  5629.  drop a rollback segment; only rollback segments not in use can be dropped.
  5630.  10,DROP ROLLBACK SEGMENT,
  5631.  
  5632.  11,DROP ROLLBACK SEGMENT,
  5633.  All space allocated to a dropped rollback segment is returned to its
  5634.  12,DROP ROLLBACK SEGMENT,
  5635.  tablespace.
  5636.  13,DROP ROLLBACK SEGMENT,
  5637.  
  5638.  14,DROP ROLLBACK SEGMENT,
  5639.  
  5640.  15,DROP ROLLBACK SEGMENT,
  5641.  
  5642.  16,DROP ROLLBACK SEGMENT,
  5643.  See also: rollback, alter rollback, create rollback, create tablespace,
  5644.  17,DROP ROLLBACK SEGMENT,
  5645.            dba, commands, menu.
  5646.   1,DROP SEQUENCE,
  5647.  
  5648.   2,DROP SEQUENCE,
  5649.  
  5650.   3,DROP SEQUENCE,
  5651.                                DROP SEQUENCE
  5652.   4,DROP SEQUENCE,
  5653.                                                             SQL statement
  5654.   5,DROP SEQUENCE,
  5655.  DROP SEQUENCE user.sequence
  5656.   6,DROP SEQUENCE,
  5657.  
  5658.   7,DROP SEQUENCE,
  5659.  
  5660.   8,DROP SEQUENCE,
  5661.  DROP SEQUENCE removes the specified sequence from the database.  You must
  5662.   9,DROP SEQUENCE,
  5663.  own an index to drop it, unless you have DBA privileges.  The user issuing
  5664.  10,DROP SEQUENCE,
  5665.  DROP SEQUENCE is assumed if user is omitted.
  5666.  11,DROP SEQUENCE,
  5667.  
  5668.  12,DROP SEQUENCE,
  5669.      One way to restart a sequence is to drop and recreate it; for example,
  5670.  13,DROP SEQUENCE,
  5671.      if sequence POWERS (which you own) is at 288, and you want to restart
  5672.  14,DROP SEQUENCE,
  5673.      it at 12, you can:
  5674.  15,DROP SEQUENCE,
  5675.  
  5676.  16,DROP SEQUENCE,
  5677.                DROP SEQUENCE powers
  5678.  17,DROP SEQUENCE,
  5679.  
  5680.  18,DROP SEQUENCE,
  5681.                CREATE SEQUENCE powers . . .
  5682.  19,DROP SEQUENCE,
  5683.                START WITH 12
  5684.  20,DROP SEQUENCE,
  5685.  
  5686.  21,DROP SEQUENCE,
  5687.  
  5688.  22,DROP SEQUENCE,
  5689.  See also: sequences, alter sequence, create sequence, commands, menu.
  5690.   1,DROP SYNONYM,
  5691.  
  5692.   2,DROP SYNONYM,
  5693.  
  5694.   3,DROP SYNONYM,
  5695.                                 DROP SYNONYM
  5696.   4,DROP SYNONYM,
  5697.                                                               SQL statement
  5698.   5,DROP SYNONYM,
  5699.  DROP PUBLIC SYNONYM user.synonym
  5700.   6,DROP SYNONYM,
  5701.  
  5702.   7,DROP SYNONYM,
  5703.  DROP SYNONYM removes the specified synonym from the database.  PUBLIC must
  5704.   8,DROP SYNONYM,
  5705.  be specified if the synonym is accessible to all users.  You must have DBA
  5706.   9,DROP SYNONYM,
  5707.  privilege to use the PUBLIC clause, or to drop a synonym you do not own.
  5708.  10,DROP SYNONYM,
  5709.  
  5710.  11,DROP SYNONYM,
  5711.  To alter a synonym, drop and recreate it.
  5712.  12,DROP SYNONYM,
  5713.  
  5714.  13,DROP SYNONYM,
  5715.  
  5716.  14,DROP SYNONYM,
  5717.  See also: synonyms, create synonym, commands, menu.
  5718.   1,DROP TABLE,
  5719.  
  5720.   2,DROP TABLE,
  5721.  
  5722.   3,DROP TABLE,
  5723.                                  DROP TABLE
  5724.   4,DROP TABLE,
  5725.                                                             SQL statement
  5726.   5,DROP TABLE,
  5727.  DROP TABLE user.table
  5728.   6,DROP TABLE,
  5729.  
  5730.   7,DROP TABLE,
  5731.  DROP TABLE removes the specified table from the database and deletes all
  5732.   8,DROP TABLE,
  5733.  it's rows.  To drop a table, you must own it or have DBA privileges.
  5734.   9,DROP TABLE,
  5735.  
  5736.  10,DROP TABLE,
  5737.  All indexes are dropped with the table.  Views and synonyms referring to
  5738.  11,DROP TABLE,
  5739.  the table are not dropped, but become invalid; you should drop them also,
  5740.  12,DROP TABLE,
  5741.  or redefine them so they become valid again.
  5742.  13,DROP TABLE,
  5743.  
  5744.  14,DROP TABLE,
  5745.  Blocks allocated to the table are returned to the tablespaces containing
  5746.  15,DROP TABLE,
  5747.  the data and the indexes, unless the table was clustered.
  5748.  16,DROP TABLE,
  5749.  
  5750.  17,DROP TABLE,
  5751.  DROP CLUSTER INCLUDING TABLES drops all tables in a cluster.
  5752.  18,DROP TABLE,
  5753.  
  5754.  19,DROP TABLE,
  5755.  It is wise to check the data dictionary table USER_CROSS_REFS to see if
  5756.  20,DROP TABLE,
  5757.  any views depend on the table you are about to drop.
  5758.  21,DROP TABLE,
  5759.  
  5760.  22,DROP TABLE,
  5761.  
  5762.  23,DROP TABLE,
  5763.  See also: drop cluster, alter table, create index, create table, tables,
  5764.  24,DROP TABLE,
  5765.            commands, menu.
  5766.   1,DROP TABLESPACE,
  5767.  
  5768.   2,DROP TABLESPACE,
  5769.  
  5770.   3,DROP TABLESPACE,
  5771.                                DROP TABLESPACE
  5772.   4,DROP TABLESPACE,
  5773.                                                              SQL statement
  5774.   5,DROP TABLESPACE,
  5775.  DROP TABLESPACE tablespace INCLUDING CONTENTS
  5776.   6,DROP TABLESPACE,
  5777.  
  5778.   7,DROP TABLESPACE,
  5779.  DROP TABLESPACE removes the specified tablespace from the database.  The
  5780.   8,DROP TABLESPACE,
  5781.  tablespace SYSTEM may not be dropped.  Only a DBA may drop a tablespace.
  5782.   9,DROP TABLESPACE,
  5783.  
  5784.  10,DROP TABLESPACE,
  5785.      INCLUDING CONTENTS
  5786.  11,DROP TABLESPACE,
  5787.          drops all objects in the tablespace, including tables, clusters,
  5788.  12,DROP TABLESPACE,
  5789.          rollback segments, and temporary segments. If INCLUDING CONTENTS
  5790.  13,DROP TABLESPACE,
  5791.          is omitted, the tablespace must be empty in order to be dropped.
  5792.  14,DROP TABLESPACE,
  5793.  
  5794.  15,DROP TABLESPACE,
  5795.  
  5796.  16,DROP TABLESPACE,
  5797.  Take a tablespace offline before trying to drop it; a tablespace cannot
  5798.  17,DROP TABLESPACE,
  5799.  be dropped while users are accessing its data, index, rollback segments,
  5800.  18,DROP TABLESPACE,
  5801.  or temporary segments.
  5802.  19,DROP TABLESPACE,
  5803.  
  5804.  20,DROP TABLESPACE,
  5805.  
  5806.  21,DROP TABLESPACE,
  5807.  See also: alter tablespace, create database, create tablespace, dba,
  5808.  22,DROP TABLESPACE,
  5809.            commands, menu.
  5810.   1,DROP VIEW,
  5811.  
  5812.   2,DROP VIEW,
  5813.  
  5814.   3,DROP VIEW,
  5815.                                   DROP VIEW
  5816.   4,DROP VIEW,
  5817.                                                            SQL statement
  5818.   5,DROP VIEW,
  5819.  DROP VIEW user.view
  5820.   6,DROP VIEW,
  5821.  
  5822.   7,DROP VIEW,
  5823.  DROP VIEW removes the specified view from the database.  To drop a view,
  5824.   8,DROP VIEW,
  5825.  you must own it or have DBA privileges.
  5826.   9,DROP VIEW,
  5827.  
  5828.  10,DROP VIEW,
  5829.  When you drop a view, any views and synonyms that refer to the view are
  5830.  11,DROP VIEW,
  5831.  not dropped, but become invalid. You should drop them also, or redefine
  5832.  12,DROP VIEW,
  5833.  them so they become valid again.
  5834.  13,DROP VIEW,
  5835.  
  5836.  14,DROP VIEW,
  5837.  To alter a view, drop and recreate it.
  5838.  15,DROP VIEW,
  5839.  
  5840.  16,DROP VIEW,
  5841.  It's wise to check the data dictionary table USER_CROSS_REFS to see if
  5842.  17,DROP VIEW,
  5843.  other views depend on the one you are about to drop.
  5844.  18,DROP VIEW,
  5845.  
  5846.  19,DROP VIEW,
  5847.  
  5848.  20,DROP VIEW,
  5849.  
  5850.  21,DROP VIEW,
  5851.  See also: views, synonyms, create table, create view, create synonym,
  5852.  22,DROP VIEW,
  5853.            data dictionary, commands, menu.
  5854.   1,Data Dictionary,
  5855.  
  5856.   2,Data Dictionary,
  5857.  
  5858.   3,Data Dictionary,
  5859.                             Data Dictionary
  5860.   4,Data Dictionary,
  5861.  
  5862.   5,Data Dictionary,
  5863.  The data dictionary stores information about ORACLE objects and events,
  5864.   6,Data Dictionary,
  5865.  accessible to the user through a variety of views.  For a complete list
  5866.   7,Data Dictionary,
  5867.  of data dictionary tables and views, query DICTIONARY.
  5868.   8,Data Dictionary,
  5869.  
  5870.   9,Data Dictionary,
  5871.  Name of View          Description
  5872.  10,Data Dictionary,
  5873.  ---------------------------------------------------------------------------
  5874.  11,Data Dictionary,
  5875.  ACCESSIBLE_COLUMNS    columns of all tables, views, and clusters
  5876.  12,Data Dictionary,
  5877.  ACCESSIBLE_TABLES     tables and views accessible to the user
  5878.  13,Data Dictionary,
  5879.  AUDIT_ACTIONS         maps action type numbers to action type names
  5880.  14,Data Dictionary,
  5881.  ALL_CATALOG           accessible tables, views, synonyms, and sequences
  5882.  15,Data Dictionary,
  5883.  ALL_COL_COMMENTS      comments on columns of accessible tables & views
  5884.  16,Data Dictionary,
  5885.  ALL_COL_GRANTS        grants on columns where the user is the grantor,
  5886.  17,Data Dictionary,
  5887.                            grantee, or owner, or PUBLIC is the grantee
  5888.  18,Data Dictionary,
  5889.  ALL_COL_GRANTS_MADE   grants on columns where user is grantor or owner
  5890.  19,Data Dictionary,
  5891.  ALL_COL_GRANTS_RECD   grants on columns where user or PUBLIC is grantee
  5892.  20,Data Dictionary,
  5893.  ALL_DB_LINKS          database links accessible to the user
  5894.  21,Data Dictionary,
  5895.  ALL_DEF_AUDIT_OPTS    table and system level default auditing options
  5896.  22,Data Dictionary,
  5897.  ALL_INDEXES           descriptions of indexes on accessible tables
  5898.  23,Data Dictionary,
  5899.  ALL_IND_COLUMNS       columns comprising indexes on accessible tables
  5900.  24,Data Dictionary,
  5901.  ALL_OBJECTS           objects accessible to the user
  5902.  25,Data Dictionary,
  5903.  ALL_SEQUENCES         descriptions of the user's own sequences
  5904.  26,Data Dictionary,
  5905.  
  5906.  27,Data Dictionary,
  5907.  Name of View          Description of Data Dictionary View
  5908.  28,Data Dictionary,
  5909.  --------------------------------------------------------------------------
  5910.  29,Data Dictionary,
  5911.  ALL_SYNONYMS          synonyms accessible to the user
  5912.  30,Data Dictionary,
  5913.  ALL_TABLES            description of tables accessible to the user
  5914.  31,Data Dictionary,
  5915.  ALL_TAB_AUDIT_OPTS    auditing options for accessible tables and views
  5916.  32,Data Dictionary,
  5917.  ALL_TAB_COLUMNS       columns of all tables, views, and clusters
  5918.  33,Data Dictionary,
  5919.  ALL_TAB_COMMENTS      comments on tables and views accessible to user
  5920.  34,Data Dictionary,
  5921.  ALL_TAB_GRANTS        grants on objects where the user is the grantor,
  5922.  35,Data Dictionary,
  5923.                            grantee, or owner, or PUBLIC is the grantee
  5924.  36,Data Dictionary,
  5925.  ALL_TAB_GRANTS_MADE   user's grants and grants on user's objects
  5926.  37,Data Dictionary,
  5927.  ALL_TAB_GRANTS_RECD   grants on objects where user or PUBLIC is grantee
  5928.  38,Data Dictionary,
  5929.  ALL_USERS             information about all users of the database
  5930.  39,Data Dictionary,
  5931.  ALL_VIEWS             text of views available to the user
  5932.  40,Data Dictionary,
  5933.  AUDIT_ACTIONS         each action code and its description
  5934.  41,Data Dictionary,
  5935.  COLUMN_PRIVILEGES     same as ALL_COL_GRANTS
  5936.  42,Data Dictionary,
  5937.  CONSTRAINT_COLUMNS    accessible columns in constraint definitions
  5938.  43,Data Dictionary,
  5939.  CONSTRAINT_DEFS       constraint definitions on accessible tables
  5940.  44,Data Dictionary,
  5941.  DICTIONARY            description of data dictionary tables and views
  5942.  45,Data Dictionary,
  5943.  DICT_COLUMNS          columns in data dictionary tables and views
  5944.  46,Data Dictionary,
  5945.  TABLE_PRIVILEGES      same as ALL_TAB_GRANTS
  5946.  47,Data Dictionary,
  5947.  USER_AUDIT_CONNECT    audit trails for user logons and logoffs
  5948.  48,Data Dictionary,
  5949.  USER_AUDIT_TRAIL      audit trail entries relevant to the user
  5950.  49,Data Dictionary,
  5951.  USER_CATALOG          accessible tables, views, synonyms, and sequences
  5952.  50,Data Dictionary,
  5953.  
  5954.  51,Data Dictionary,
  5955.  Name of View          Description of Data Dictionary View
  5956.  52,Data Dictionary,
  5957.  ------------------------------------------------------------------------
  5958.  53,Data Dictionary,
  5959.  USER_CLUSTERS         descriptions of user's own clusters
  5960.  54,Data Dictionary,
  5961.  USER_CLU_COLUMNS      mapping of table columns to cluster columns
  5962.  55,Data Dictionary,
  5963.  USER_COL_COMMENTS     comments on columns of user's tables and views
  5964.  56,Data Dictionary,
  5965.  USER_COL_GRANTS       grants on columns where the user is the owner,
  5966.  57,Data Dictionary,
  5967.                           grantor, or grantee
  5968.  58,Data Dictionary,
  5969.  USER_COL_GRANTS_MADE  grants on columns of objects owned by the user
  5970.  59,Data Dictionary,
  5971.  USER_COL_GRANTS_RECD  grants on columns where the user is the grantee
  5972.  60,Data Dictionary,
  5973.  USER_CROSS_REF        cross ref for user's views, synonyms, constraints
  5974.  61,Data Dictionary,
  5975.  USER_DB_LINKS         database links owned by the user
  5976.  62,Data Dictionary,
  5977.  USER_EXTENTS          extents comprising segments owned by the user
  5978.  63,Data Dictionary,
  5979.  USER_FREE_SPACE       free extents in tablespaces owned by the user
  5980.  64,Data Dictionary,
  5981.  USER_INDEXES          descriptions of the user's own indexes
  5982.  65,Data Dictionary,
  5983.  USER_IND_COLUMNS      columns comprising indexes on the user's tables
  5984.  66,Data Dictionary,
  5985.  USER_OBJECTS          objects owned by the user
  5986.  67,Data Dictionary,
  5987.  USER_SEGMENTS         storage allocated for all database segments
  5988.  68,Data Dictionary,
  5989.  USER_SEQUENCES        descriptions of the user's own sequences
  5990.  69,Data Dictionary,
  5991.  USER_SYNONYMS         the user's private synonyms
  5992.  70,Data Dictionary,
  5993.  USER_TABLES           descriptions of the user's own tables
  5994.  71,Data Dictionary,
  5995.  USER_TABLESPACES      description of accessible tablespaces
  5996.  72,Data Dictionary,
  5997.  USER_TAB_AUDIT_OPTS   auditing options for the user's tables and views
  5998.  73,Data Dictionary,
  5999.  USER_TAB_COLUMNS      columns of the user's tables, views, and clusters
  6000.  74,Data Dictionary,
  6001.  
  6002.  75,Data Dictionary,
  6003.  Name of View          Description of Data Dictionary View
  6004.  76,Data Dictionary,
  6005.  ------------------------------------------------------------------------
  6006.  77,Data Dictionary,
  6007.  USER_TAB_COMMENTS     comments on tables and views owned by the user
  6008.  78,Data Dictionary,
  6009.  USER_TAB_GRANTS       grants on objects where the user is the owner,
  6010.  79,Data Dictionary,
  6011.                           grantor, or grantee
  6012.  80,Data Dictionary,
  6013.  USER_TAB_GRANTS_MADE  grants on objects owned by the user
  6014.  81,Data Dictionary,
  6015.  USER_TAB_GRANTS_RECD  grants on objects where the user is the grantee
  6016.  82,Data Dictionary,
  6017.  USER_TS_QUOTAS        tablespace quotas for the user
  6018.  83,Data Dictionary,
  6019.  USER_USERS            information about the current user
  6020.  84,Data Dictionary,
  6021.  USER_VIEWS            text of views owned by the user
  6022.  85,Data Dictionary,
  6023.  
  6024.  86,Data Dictionary,
  6025.  
  6026.  87,Data Dictionary,
  6027.  See also: sequences, synonyms, commands, menu.
  6028.   1,Date Functions,
  6029.  
  6030.   2,Date Functions,
  6031.  
  6032.   3,Date Functions,
  6033.                               Date Functions
  6034.   4,Date Functions,
  6035.  
  6036.   5,Date Functions,
  6037.  Most of these return DATE values; MONTHS_BETWEEN returns a numeric value:
  6038.   6,Date Functions,
  6039.  
  6040.   7,Date Functions,
  6041.  ADD_MONTHS(d, n)       Returns date d with n months more; n = integer.
  6042.   8,Date Functions,
  6043.  LAST_DAY(d)            Returns date of the last day of d date's month.
  6044.   9,Date Functions,
  6045.  MONTHS_BETWEEN(d, e)   Returns number of months between dates d and e.
  6046.  10,Date Functions,
  6047.  NEW_TIME(d, a, b)      Given date d in time zone a, returns date/time in
  6048.  11,Date Functions,
  6049.                            zone b, using time zone abbreviations (below).
  6050.  12,Date Functions,
  6051.  NEXT_DAY(d, day)       Returns date of the day (Tue) coming after date d.
  6052.  13,Date Functions,
  6053.  SYSDATE                Returns the current date and time.
  6054.  14,Date Functions,
  6055.  ROUND(d, format)       Returns d rounded by a specified format (below).
  6056.  15,Date Functions,
  6057.  TRUNC(d, format)       Returns d truncated by a specified format (below);
  6058.  16,Date Functions,
  6059.                            TRUNC with no format strips time from a date.
  6060.  17,Date Functions,
  6061.  
  6062.  18,Date Functions,
  6063.  Time Zone  Standard  Daylight       Time Zone     Standard  Daylight
  6064.  19,Date Functions,
  6065.  -----------------------------       --------------------------------
  6066.  20,Date Functions,
  6067.  Atlantic    'AST'     'ADT'         Hawaii/Alaska  'HST'     'HDT'
  6068.  21,Date Functions,
  6069.  Bering      'BST'     'BDT'         Mountain       'MST'     'MDT'
  6070.  22,Date Functions,
  6071.  Central     'CST'     'CDT'         Newfoundland   'NST'      ---
  6072.  23,Date Functions,
  6073.  Eastern     'EST'     'EDT'         Pacific        'PST'     'PDT'
  6074.  24,Date Functions,
  6075.  Greenwich Mean Time = 'GMT'         Yukon          'YST'     'YDT'
  6076.  25,Date Functions,
  6077.  
  6078.  26,Date Functions,
  6079.  
  6080.  27,Date Functions,
  6081.  
  6082.  28,Date Functions,
  6083.  Format         ROUND or TRUNC to          Format        ROUND/TRUNC to
  6084.  29,Date Functions,
  6085.  -------------------------------------------------------------------------
  6086.  30,Date Functions,
  6087.  CC             century                    WW            week of YEAR
  6088.  31,Date Functions,
  6089.  SCC            century B.C.               W             week of MONTH
  6090.  32,Date Functions,
  6091.  YYYY/YEAR/YYY  year (rounds up on 7/1)    DDD/DD/J      day
  6092.  33,Date Functions,
  6093.  YY/Y/SYEAR                                DAY/DY/D      nearest Sunday
  6094.  34,Date Functions,
  6095.  Q              quarter (rounds up on      HH/HH12/HH24  hour
  6096.  35,Date Functions,
  6097.                 16th of 2nd mo)            MI            minute
  6098.  36,Date Functions,
  6099.  MONTH/MON/MM   month (rounds up on 16th)
  6100.  37,Date Functions,
  6101.  
  6102.  38,Date Functions,
  6103.  
  6104.  39,Date Functions,
  6105.  
  6106.  40,Date Functions,
  6107.  More functions: 1 row char, 1 row number, conversion, error reporting,
  6108.  41,Date Functions,
  6109.                  group, other functions.
  6110.  42,Date Functions,
  6111.  
  6112.  43,Date Functions,
  6113.  
  6114.  44,Date Functions,
  6115.   See also: date (datatype), format dates, format modifiers, menu.
  6116.   1,Delimiters,
  6117.  
  6118.   2,Delimiters,
  6119.                                 Delimiters
  6120.   3,Delimiters,
  6121.  
  6122.   4,Delimiters,
  6123.  ( )      operator; encloses parameters
  6124.   5,Delimiters,
  6125.  + - * /  arithmetic operators
  6126.   6,Delimiters,
  6127.  = < >    logical operators
  6128.   7,Delimiters,
  6129.  ;        ends a SQL statement
  6130.   8,Delimiters,
  6131.  %        indicates a PL/SQL attribute
  6132.   9,Delimiters,
  6133.  ,        separates items in a list
  6134.  10,Delimiters,
  6135.  .        references table.field_names and PL/SQL record.field_names.
  6136.  11,Delimiters,
  6137.           (Use a . on a line by itself to end a PL/SQL block.)
  6138.  12,Delimiters,
  6139.  @        references remote databases; @ filename executes a command file
  6140.  13,Delimiters,
  6141.  ' '      encloses a 'character string'
  6142.  14,Delimiters,
  6143.  " "      allows anything in identifiers
  6144.  15,Delimiters,
  6145.  :        host variable/bind parameters
  6146.  16,Delimiters,
  6147.  <>  !=   ~=   ^=   <=   >=       PL/SQL relational operators
  6148.  17,Delimiters,
  6149.  << >>    encloses loop, block, and GOTO label names in PL/SQL
  6150.  18,Delimiters,
  6151.  --       comment to the end of a line in PL/SQL blocks
  6152.  19,Delimiters,
  6153.  /*       begin multi-line comment
  6154.  20,Delimiters,
  6155.  */       end multi-line comment
  6156.  21,Delimiters,
  6157.  ..       numeric FOR loop range in PL/SQL
  6158.  22,Delimiters,
  6159.  :=       variable assignment in PL/SQL
  6160.  23,Delimiters,
  6161.  **       exponentiation
  6162.  24,Delimiters,
  6163.  ||       string concatenation
  6164.  25,Delimiters,
  6165.  See also:  identifiers, arithmetic, commands, menu.
  6166.   1,Distributed Query,
  6167.  
  6168.   2,Distributed Query,
  6169.                          Distributed Query
  6170.   3,Distributed Query,
  6171.  
  6172.   4,Distributed Query,
  6173.  A distributed query requires the use of a database link between
  6174.   5,Distributed Query,
  6175.  systems with SQL*Net.  The syntax is the same as other queries;
  6176.   6,Distributed Query,
  6177.  a database link name or its synonym follows the table name:
  6178.   7,Distributed Query,
  6179.  
  6180.   8,Distributed Query,
  6181.       SELECT column2, column3,...
  6182.   9,Distributed Query,
  6183.          FROM remote_table@database_link, local_table
  6184.  10,Distributed Query,
  6185.          WHERE remote_table.column1 = local_table.column_1;
  6186.  11,Distributed Query,
  6187.  
  6188.  12,Distributed Query,
  6189.  
  6190.  13,Distributed Query,
  6191.  Remote table references are supported in FROM clauses of SELECT
  6192.  14,Distributed Query,
  6193.  and INSERT INTO...SELECT statements, and in table qualifiers of
  6194.  15,Distributed Query,
  6195.  column references in these statements.
  6196.  16,Distributed Query,
  6197.  
  6198.  17,Distributed Query,
  6199.  
  6200.  18,Distributed Query,
  6201.  
  6202.  19,Distributed Query,
  6203.  See also: links, remote databases, synonyms, select, insert, from,
  6204.  20,Distributed Query,
  6205.            uses of select, menu.
  6206.   1,EDIT,
  6207.  
  6208.   2,EDIT,
  6209.  
  6210.   3,EDIT,
  6211.                                 EDIT
  6212.   4,EDIT,
  6213.  
  6214.   5,EDIT,
  6215.  EDIT [ file_name[.ext ] ]
  6216.   6,EDIT,
  6217.  
  6218.   7,EDIT,
  6219.  EDIT invokes a host operating system text editor on the contents of the
  6220.   8,EDIT,
  6221.  specified file or on the contents of the buffer.
  6222.   9,EDIT,
  6223.  
  6224.  10,EDIT,
  6225.      file_name[.ext ]
  6226.  11,EDIT,
  6227.          is the file to edit (typically a command file).  If you omit ext,
  6228.  12,EDIT,
  6229.          the default command file extension (normally SQL) is assumed.
  6230.  13,EDIT,
  6231.          See the SET command's SUFFIX variable for information on changing
  6232.  14,EDIT,
  6233.          the default extension.  Enter EDIT with no file_name to edit the
  6234.  15,EDIT,
  6235.          SQL buffer's contents with the host operating system editor.
  6236.  16,EDIT,
  6237.  
  6238.  17,EDIT,
  6239.  The user variable _EDITOR contains the name of the text editor invoked by
  6240.  18,EDIT,
  6241.  EDIT; to change the text editor, change the _EDITOR name.  See DEFINE for
  6242.  19,EDIT,
  6243.  information on changing the value of a user variable.  If _EDITOR is
  6244.  20,EDIT,
  6245.  undefined, EDIT tries to use the default host operating system editor.
  6246.  21,EDIT,
  6247.  
  6248.  22,EDIT,
  6249.  EDIT alone places the buffer's contents in a file named AFIEDT.BUF in your
  6250.  23,EDIT,
  6251.  current working directory, then invokes the text editor on the contents of
  6252.  24,EDIT,
  6253.  that file.  The text is saved back into the SQL buffer.  EDIT returns an
  6254.  25,EDIT,
  6255.  error message if you don't specify a file name and the buffer is empty. To
  6256.  26,EDIT,
  6257.  leave the editing session and return to SQL*Plus, terminate the editing
  6258.  27,EDIT,
  6259.  session in the way customary for the text editor.
  6260.  28,EDIT,
  6261.  
  6262.  29,EDIT,
  6263.  
  6264.  30,EDIT,
  6265.  Example:  To edit the file REPORT with the extension SQL using your host
  6266.  31,EDIT,
  6267.            operating system text editor, enter:
  6268.  32,EDIT,
  6269.  
  6270.  33,EDIT,
  6271.                SQL> EDIT REPORT
  6272.  34,EDIT,
  6273.  
  6274.  35,EDIT,
  6275.  
  6276.  36,EDIT,
  6277.  See also: append, change, del, define, input, list, save, spool, undefine,
  6278.  37,EDIT,
  6279.            commands, menu.
  6280.   1,END,
  6281.  
  6282.   2,END,
  6283.                            END
  6284.   3,END,
  6285.                                                 PL/SQL statements
  6286.   4,END,
  6287.  
  6288.   5,END,
  6289.  <<label_name_1>>                 --<<label_name>> is optional; if
  6290.   6,END,
  6291.  BEGIN                              used before BEGIN it must also
  6292.   7,END,
  6293.      rest_of_block                  appear at the END of the block.
  6294.   8,END,
  6295.  END label_name_1;
  6296.   9,END,
  6297.  
  6298.  10,END,
  6299.      previous_LOOP_statement_part
  6300.  11,END,
  6301.  END LOOP label_name;             --label_name is optional
  6302.  12,END,
  6303.  
  6304.  13,END,
  6305.      previous_IF_statement_part
  6306.  14,END,
  6307.  END IF;
  6308.  15,END,
  6309.  
  6310.  16,END,
  6311.  END must be the last statement in each PL/SQL block. A label_name
  6312.  17,END,
  6313.  permits you to reference an enclosing block's declarations, or an
  6314.  18,END,
  6315.  outer loop's index.
  6316.  19,END,
  6317.  
  6318.  20,END,
  6319.  
  6320.  21,END,
  6321.  See also: example numeric for, begin, loop, if, blocks, declare,
  6322.  22,END,
  6323.            commands, menu.
  6324.   1,EXCEPTION,
  6325.  
  6326.   2,EXCEPTION,
  6327.  
  6328.   3,EXCEPTION,
  6329.                                 EXCEPTION
  6330.   4,EXCEPTION,
  6331.                                                     PL/SQL statement
  6332.   5,EXCEPTION,
  6333.  
  6334.   6,EXCEPTION,
  6335.  EXCEPTION                                     --section is optional
  6336.   7,EXCEPTION,
  6337.     WHEN exception_name THEN statements;
  6338.   8,EXCEPTION,
  6339.     WHEN exception_name OR exception_name THEN statements;
  6340.   9,EXCEPTION,
  6341.     ...
  6342.  10,EXCEPTION,
  6343.     WHEN OTHERS THEN sequence_of_statements;   --optional
  6344.  11,EXCEPTION,
  6345.  
  6346.  12,EXCEPTION,
  6347.  Exception handling routines are specified before the END of a block.
  6348.  13,EXCEPTION,
  6349.  Each WHEN clause names an exception and defines actions to be taken
  6350.  14,EXCEPTION,
  6351.  when the exception is raised.  User-defined exceptions are declared
  6352.  15,EXCEPTION,
  6353.  in the current block's (or in an enclosing block's) DECLARE section.
  6354.  16,EXCEPTION,
  6355.  There are also predefined internal PL/SQL exceptions.
  6356.  17,EXCEPTION,
  6357.  
  6358.  18,EXCEPTION,
  6359.  OTHERS handles any exceptions not explicitly named; it must be last.
  6360.  19,EXCEPTION,
  6361.  
  6362.  20,EXCEPTION,
  6363.  
  6364.  21,EXCEPTION,
  6365.  See also: example error handling, error handling, blocks, declare,
  6366.  22,EXCEPTION,
  6367.            pl/sql exceptions, commands, menu.
  6368.   1,EXIT,
  6369.  
  6370.   2,EXIT,
  6371.  
  6372.   3,EXIT,
  6373.                                     EXIT
  6374.   4,EXIT,
  6375.  
  6376.   5,EXIT,
  6377.  {EXIT | QUIT} [SUCCESS | FAILURE | WARNING | n | variable]
  6378.   6,EXIT,
  6379.  
  6380.   7,EXIT,
  6381.  EXIT commits all pending database changes, leaves SQL*Plus, and returns
  6382.   8,EXIT,
  6383.  control to the operating system.
  6384.   9,EXIT,
  6385.  
  6386.  10,EXIT,
  6387.      {EXIT | QUIT}
  6388.  11,EXIT,
  6389.          can be used interchangeably.
  6390.  12,EXIT,
  6391.  
  6392.  13,EXIT,
  6393.      SUCCESS
  6394.  14,EXIT,
  6395.          exits normally.
  6396.  15,EXIT,
  6397.  
  6398.  16,EXIT,
  6399.       FAILURE
  6400.  17,EXIT,
  6401.          exits with a return code indicating failure.
  6402.  18,EXIT,
  6403.  
  6404.  19,EXIT,
  6405.      WARNING
  6406.  20,EXIT,
  6407.          exits with a return code indicating warning.  EXIT with no clauses
  6408.  21,EXIT,
  6409.          exits with a value of SUCCESS.
  6410.  22,EXIT,
  6411.  
  6412.  23,EXIT,
  6413.      n   is an integer you can specify as the return code.
  6414.  24,EXIT,
  6415.  
  6416.  25,EXIT,
  6417.      variable
  6418.  26,EXIT,
  6419.          is a user-defined or system variable, like SQL.SQLCODE.
  6420.  27,EXIT,
  6421.          EXIT variable exits with the value of variable as the return code.
  6422.  28,EXIT,
  6423.  
  6424.  29,EXIT,
  6425.  EXIT enables you to specify an operating system return code so you can run
  6426.  30,EXIT,
  6427.  SQL*Plus command files in batch mode and detect an unexpected event.  The
  6428.  31,EXIT,
  6429.  manner of detection is operating-system specific.  SUCCESS, WARNING, and
  6430.  32,EXIT,
  6431.  FAILURE represent operating system dependent values; on some systems,
  6432.  33,EXIT,
  6433.  WARNING and FAILURE are not distinguishable.  To exit conditionally, use
  6434.  34,EXIT,
  6435.  WHENEVER SQLERROR.
  6436.  35,EXIT,
  6437.  
  6438.  36,EXIT,
  6439.  
  6440.  37,EXIT,
  6441.  Example:  The following returns the error code of the last executed SQL
  6442.  38,EXIT,
  6443.            command or PL/SQL block:
  6444.  39,EXIT,
  6445.  
  6446.  40,EXIT,
  6447.                SQL> EXIT SQL.SQLCODE
  6448.  41,EXIT,
  6449.  
  6450.  42,EXIT,
  6451.            The location of the return code depends on your system.
  6452.  43,EXIT,
  6453.  
  6454.  44,EXIT,
  6455.  
  6456.  45,EXIT,
  6457.  See also: connect, disconnect, host, quit, save, spool, SQLPlus,
  6458.  46,EXIT,
  6459.            whenever sqlerror, commands, menu.
  6460.   1,EXIT PL/SQL,
  6461.  
  6462.   2,EXIT PL/SQL,
  6463.  
  6464.   3,EXIT PL/SQL,
  6465.                               EXIT PL/SQL
  6466.   4,EXIT PL/SQL,
  6467.                                                  PL/SQL statement
  6468.   5,EXIT PL/SQL,
  6469.  EXIT label_name WHEN plsql_condition;
  6470.   6,EXIT PL/SQL,
  6471.  
  6472.   7,EXIT PL/SQL,
  6473.  Without label_name and WHEN clause, EXIT leaves the current loop.
  6474.   8,EXIT PL/SQL,
  6475.  Use a label_name to exit an outer loop with that same label_name.
  6476.   9,EXIT PL/SQL,
  6477.  
  6478.  10,EXIT PL/SQL,
  6479.  If you use WHEN and specify a plsql_condition, an exit will occur
  6480.  11,EXIT PL/SQL,
  6481.  whenever the condition evaluates to TRUE.
  6482.  12,EXIT PL/SQL,
  6483.  
  6484.  13,EXIT PL/SQL,
  6485.  When executed in a cursor FOR loop, EXIT also closes the cursor.
  6486.  14,EXIT PL/SQL,
  6487.  
  6488.  15,EXIT PL/SQL,
  6489.  
  6490.  16,EXIT PL/SQL,
  6491.  See also: example where current of, loop, conditions, cursor for,
  6492.  17,EXIT PL/SQL,
  6493.            cursors, commands, menu.
  6494.   1,Error Handling,
  6495.  
  6496.   2,Error Handling,
  6497.  
  6498.   3,Error Handling,
  6499.                              Error Handling
  6500.   4,Error Handling,
  6501.  
  6502.   5,Error Handling,
  6503.  Exceptions are internally-defined or user-defined error conditions.
  6504.   6,Error Handling,
  6505.  In PL/SQL, you can specify what to do if an error condition occurs.
  6506.   7,Error Handling,
  6507.  
  6508.   8,Error Handling,
  6509.  You can define exceptions within a block's DECLARE section, then test 
  6510.   9,Error Handling,
  6511.  for exceptions in the block's body.  If an exception exists, you execute
  6512.  10,Error Handling,
  6513.  a RAISE statement, stopping normal execution of the block and passing
  6514.  11,Error Handling,
  6515.  passing control to an exception handler in the block's EXCEPTION section.
  6516.  12,Error Handling,
  6517.  
  6518.  13,Error Handling,
  6519.  
  6520.  14,Error Handling,
  6521.  
  6522.  15,Error Handling,
  6523.  See also:  declare, exception, pragma exception_init, raise, 
  6524.  16,Error Handling,
  6525.             pl/sql exceptions, error reporting (functions),
  6526.  21,Error Handling,
  6527.             example error handling, blocks, commands, menu.
  6528.  23,Error Handling,
  6529.  
  6530.  24,Error Handling,
  6531.  See also: blocks, menu.
  6532.   1,Error Reporting Functions,
  6533.  
  6534.   2,Error Reporting Functions,
  6535.  
  6536.   3,Error Reporting Functions,
  6537.                          Error Reporting Functions
  6538.   4,Error Reporting Functions,
  6539.  
  6540.   5,Error Reporting Functions,
  6541.  SQLCODE  returns the ORACLE error code of the internal exception that
  6542.   6,Error Reporting Functions,
  6543.           passed control to an exception handler. Or, if the exception
  6544.   7,Error Reporting Functions,
  6545.           is declared by the user within the current (or an enclosing)
  6546.   8,Error Reporting Functions,
  6547.           block, SQLCODE returns +1.  Outside an exception handler, it
  6548.   9,Error Reporting Functions,
  6549.           returns 0. SQLCODE lets you identify exceptions in an OTHERS
  6550.  10,Error Reporting Functions,
  6551.           handler.
  6552.  11,Error Reporting Functions,
  6553.  
  6554.  12,Error Reporting Functions,
  6555.  SQLERRM(error_code)  returns the error message for the error_code you
  6556.  13,Error Reporting Functions,
  6557.           specify.  To have SQLERRM return the current SQLCODE value's
  6558.  14,Error Reporting Functions,
  6559.           message, omit the error_code.  Outside an exception handler,
  6560.  15,Error Reporting Functions,
  6561.           SQLERRM gives the message "normal, successful completion".
  6562.  16,Error Reporting Functions,
  6563.  
  6564.  17,Error Reporting Functions,
  6565.  To use SQLCODE or SQLERRM in a SQL statement, assign it to a variable:
  6566.  18,Error Reporting Functions,
  6567.           sql_code_num := SQLCODE
  6568.  19,Error Reporting Functions,
  6569.  
  6570.  20,Error Reporting Functions,
  6571.  
  6572.  21,Error Reporting Functions,
  6573.  
  6574.  22,Error Reporting Functions,
  6575.  More functions: 1 row char, 1 row number, conversion, date functions,
  6576.  23,Error Reporting Functions,
  6577.                  group, other functions.
  6578.  24,Error Reporring Functions,
  6579.  
  6580.  25,Error Reporting Functions,
  6581.  See also:  error handling, variable, exception, commands, menu.
  6582.   1,Example CONNECT BY,
  6583.  
  6584.   2,Example CONNECT BY,
  6585.  
  6586.   3,Example CONNECT BY,
  6587.                              Example CONNECT BY
  6588.   4,Example CONNECT BY,
  6589.  
  6590.   5,Example CONNECT BY,
  6591.  To show an indented list of employees in manager/employee order,
  6592.   6,Example CONNECT BY,
  6593.  use a tree-structured query:
  6594.   7,Example CONNECT BY,
  6595.  
  6596.   8,Example CONNECT BY,
  6597.  SELECT LPAD(' ', 2*LEVEL)||ename organization, level, empno, mgr
  6598.   9,Example CONNECT BY,
  6599.     FROM emp
  6600.  10,Example CONNECT BY,
  6601.     CONNECT BY PRIOR empno = mgr START WITH ename = 'KING';
  6602.  11,Example CONNECT BY,
  6603.  
  6604.  12,Example CONNECT BY,
  6605.             ORGANIZATION  LEVEL EMPNO   MGR
  6606.  13,Example CONNECT BY,
  6607.             -------------------------------
  6608.  14,Example CONNECT BY,
  6609.             KING             1  7839           (root node = KING)
  6610.  15,Example CONNECT BY,
  6611.               JONES          2  7566   7839
  6612.  16,Example CONNECT BY,
  6613.                 SCOTT        3  7788   7566
  6614.  17,Example CONNECT BY,
  6615.                   ADAMS      4  7876   7788
  6616.  18,Example CONNECT BY,
  6617.                 FORD         3  7902   7566
  6618.  19,Example CONNECT BY,
  6619.                   SMITH      4  7369   7902
  6620.  20,Example CONNECT BY,
  6621.               BLAKE          2  7698   7839
  6622.  21,Example CONNECT BY,
  6623.                 ALLEN        3  7499   7698
  6624.  22,Example CONNECT BY,
  6625.                 WARD         3  7521   7698
  6626.  23,Example CONNECT BY,
  6627.  
  6628.  24,Example CONNECT BY,
  6629.  See also: connect by, tree-structured query, select, menu.
  6630.   1,Example CURSOR FOR,
  6631.  
  6632.   2,Example CURSOR FOR,
  6633.  
  6634.   3,Example CURSOR FOR,
  6635.                             Example CURSOR FOR
  6636.   4,Example CURSOR FOR,
  6637.  
  6638.   5,Example CURSOR FOR,
  6639.  DECLARE
  6640.   6,Example CURSOR FOR,
  6641.    CURSOR emp_cursor(dnum NUMBER) IS                 Computes total wages
  6642.   7,Example CURSOR FOR,
  6643.      SELECT sal, comm FROM emp WHERE deptno=dnum;    (sal + comm) paid to
  6644.   8,Example CURSOR FOR,
  6645.    total_wages       NUMBER(11,2) := 0;              employees in dept.20
  6646.   9,Example CURSOR FOR,
  6647.    high_paid         NUMBER(4)    := 0;              and how many receive
  6648.  10,Example CURSOR FOR,
  6649.  BEGIN                                               a salary over $2000.
  6650.  11,Example CURSOR FOR,
  6651.    FOR emp_record IN emp_cursor(20) LOOP
  6652.  12,Example CURSOR FOR,
  6653.       emp_record.comm := NVL(emp_record.comm, 0);
  6654.  13,Example CURSOR FOR,
  6655.       total_wages := total_wages + emp_record.sal + emp_record.comm;
  6656.  14,Example CURSOR FOR,
  6657.       IF emp_record.sal > 2000.00 THEN high_paid := high_paid + 1;
  6658.  15,Example CURSOR FOR,
  6659.       END IF;
  6660.  16,Example CURSOR FOR,
  6661.    END LOOP;
  6662.  17,Example CURSOR FOR,
  6663.    INSERT INTO temp VALUES (high_paid, higher_comm,
  6664.  18,Example CURSOR FOR,
  6665.       'Total Wages: ' || TO_CHAR(total_wages));
  6666.  19,Example CURSOR FOR,
  6667.    COMMIT;
  6668.  20,Example CURSOR FOR,
  6669.  END;
  6670.  21,Example CURSOR FOR,
  6671.  
  6672.  22,Example CURSOR FOR,
  6673.  
  6674.  23,Example CURSOR FOR,
  6675.  See also: cursor for, cursors, declare, loop, if, insert, examples, menu.
  6676.   1,Example Conversion,
  6677.  
  6678.   2,Example Conversion,
  6679.  
  6680.   3,Example Conversion,
  6681.                     Example Conversion (Functions)
  6682.   4,Example Conversion,
  6683.  
  6684.   5,Example Conversion,
  6685.  To compute the number of days remaining in 1989 (on 5/31/89):
  6686.   6,Example Conversion,
  6687.  
  6688.   7,Example Conversion,
  6689.  SELECT SYSDATE, TO_DATE('01-JAN-90') - ROUND(SYSDATE) days_left
  6690.   8,Example Conversion,
  6691.    FROM dummy;
  6692.   9,Example Conversion,
  6693.                                                SYSDATE    DAYS_LEFT
  6694.  10,Example Conversion,
  6695.                                                --------------------
  6696.  11,Example Conversion,
  6697.                                                31-May-89        214
  6698.  12,Example Conversion,
  6699.  
  6700.  13,Example Conversion,
  6701.  
  6702.  14,Example Conversion,
  6703.  To count the employees hired each year:
  6704.  15,Example Conversion,
  6705.                                                      HIRED COUNT(*)
  6706.  16,Example Conversion,
  6707.  SELECT TO_CHAR(hiredate, 'YYYY') hired, COUNT(*)    --------------
  6708.  17,Example Conversion,
  6709.    FROM emp                                          1986         1
  6710.  18,Example Conversion,
  6711.    GROUP BY TO_CHAR(hiredate, 'YYYY');               1987        10
  6712.  19,Example Conversion,
  6713.                                                      1988         1
  6714.  20,Example Conversion,
  6715.                                                      1989         2
  6716.  21,Example Conversion,
  6717.  
  6718.  22,Example Conversion,
  6719.  
  6720.  23,Example Conversion,
  6721.  See also: conversion (functions), select, group by, examples, menu.
  6722.   1,Example Correlated Subquery,
  6723.  
  6724.   2,Example Correlated Subquery,
  6725.  
  6726.   3,Example Correlated Subquery,
  6727.                         Example Correlated Subquery
  6728.   4,Example Correlated Subquery,
  6729.  
  6730.   5,Example Correlated Subquery,
  6731.  This correlated subquery displays all employees whose salary is
  6732.   6,Example Correlated Subquery,
  6733.  greater than the average salary of their own department.
  6734.   7,Example Correlated Subquery,
  6735.  
  6736.   8,Example Correlated Subquery,
  6737.  SELECT ename, deptno, sal                    DEPTNO ENAME   SAL
  6738.   9,Example Correlated Subquery,
  6739.    FROM emp emp_twin                          ------------------
  6740.  10,Example Correlated Subquery,
  6741.    WHERE sal > (SELECT AVG(sal)                   10 KING   5000
  6742.  11,Example Correlated Subquery,
  6743.          FROM emp                                 20 JONES  2975
  6744.  12,Example Correlated Subquery,
  6745.          WHERE emp.deptno = emp_twin.deptno)      20 SCOTT  3000
  6746.  13,Example Correlated Subquery,
  6747.    ORDER BY deptno;                               20 FORD   3000
  6748.  14,Example Correlated Subquery,
  6749.  
  6750.  15,Example Correlated Subquery,
  6751.  
  6752.  16,Example Correlated Subquery,
  6753.   The ROWID with DELETE example shows another correlated subquery.
  6754.  17,Example Correlated Subquery,
  6755.  
  6756.  18,Example Correlated Subquery,
  6757.  
  6758.  19,Example Correlated Subquery,
  6759.  See also: correlated subquery, select, example delete, examples,
  6760.  20,Example Correlated Subquery,
  6761.            menu.
  6762.   1,Example Cursors,
  6763.  
  6764.   2,Example Cursors,
  6765.  
  6766.   3,Example Cursors,
  6767.                             Example Cursors
  6768.   4,Example Cursors,
  6769.  
  6770.   5,Example Cursors,
  6771.  DECLARE                                Returns the five highest paid
  6772.   6,Example Cursors,
  6773.    CURSOR c1 IS                         employees from the emp table,
  6774.   7,Example Cursors,
  6775.      SELECT ename, sal FROM emp         and stores the result in tmp,
  6776.   8,Example Cursors,
  6777.      ORDER BY sal DESC;                 a table created for transfer.
  6778.   9,Example Cursors,
  6779.    name       emp.ename%TYPE;
  6780.  10,Example Cursors,
  6781.    salary     emp.sal%TYPE;             Output:  SELECT * FROM tmp
  6782.  11,Example Cursors,
  6783.  BEGIN                                           ORDER BY earns DESC;
  6784.  12,Example Cursors,
  6785.    OPEN c1;
  6786.  13,Example Cursors,
  6787.    FOR i IN 1..5 LOOP                            EMPLOYEE       EARNS
  6788.  14,Example Cursors,
  6789.      FETCH c1 INTO name, salary;                 --------------------
  6790.  15,Example Cursors,
  6791.      EXIT WHEN c1%NOTFOUND;                      KING            5000
  6792.  16,Example Cursors,
  6793.      INSERT INTO tmp VALUES(name, salary);       SCOTT           3000
  6794.  17,Example Cursors,
  6795.      COMMIT;                                     FORD            3000
  6796.  18,Example Cursors,
  6797.    END LOOP;                                     JONES           2975
  6798.  19,Example Cursors,
  6799.    CLOSE c1;                                     BLAKE           2850
  6800.  20,Example Cursors,
  6801.  END;
  6802.  21,Example Cursors,
  6803.  
  6804.  22,Example Cursors,
  6805.  
  6806.  23,Example Cursors,
  6807.  See also: cursors, declare, open, loop, fetch, exit plsql, insert,
  6808.  24,Example Cursors,
  6809.            commit, close, examples, menu.
  6810.   1,Example DELETE,
  6811.  
  6812.   2,Example DELETE,
  6813.  
  6814.   3,Example DELETE,
  6815.                            Example DELETE
  6816.   4,Example DELETE,
  6817.  
  6818.   5,Example DELETE,
  6819.  This statement uses ROWID within a correlated subquery to eliminate
  6820.   6,Example DELETE,
  6821.  any duplicate rows in the dept table:
  6822.   7,Example DELETE,
  6823.  
  6824.   8,Example DELETE,
  6825.  
  6826.   9,Example DELETE,
  6827.  DELETE FROM dept x  WHERE ROWID > (SELECT MIN(ROWID)
  6828.  10,Example DELETE,
  6829.                                       FROM dept y
  6830.  11,Example DELETE,
  6831.                                       WHERE x.deptno = y.deptno
  6832.  12,Example DELETE,
  6833.                                         AND x.dname  = y.dname
  6834.  13,Example DELETE,
  6835.                                         AND x.loc    = y.loc);
  6836.  14,Example DELETE,
  6837.  
  6838.  15,Example DELETE,
  6839.  
  6840.  16,Example DELETE,
  6841.  
  6842.  17,Example DELETE,
  6843.  For an example of a correlated subquery in a SELECT statement, see
  6844.  18,Example DELETE,
  6845.  example correlated subquery.
  6846.  19,Example DELETE,
  6847.  
  6848.  20,Example DELETE,
  6849.  See also: rowid, correlated subquery, delete, examples, menu.
  6850.   1,Example Datatype,
  6851.  
  6852.   2,Example Datatype,
  6853.  
  6854.   3,Example Datatype,
  6855.                             Example Datatype
  6856.   4,Example Datatype,
  6857.  
  6858.   5,Example Datatype,
  6859.  From a script file for building example tables:
  6860.   6,Example Datatype,
  6861.  
  6862.   7,Example Datatype,
  6863.  DROP TABLE accounts;
  6864.   8,Example Datatype,
  6865.  CREATE TABLE accounts(
  6866.   9,Example Datatype,
  6867.     account_id  NUMBER(4) NOT NULL,   --up to 4 digits; cannot be null
  6868.  10,Example Datatype,
  6869.     bal         NUMBER(11, 2));       --up to 11 digits, 2 of which
  6870.  11,Example Datatype,
  6871.  DROP TABLE action;                     are after the decimal point
  6872.  12,Example Datatype,
  6873.  CREATE TABLE action(
  6874.  13,Example Datatype,
  6875.     account_id  NUMBER(4) NOT NULL,
  6876.  14,Example Datatype,
  6877.     oper_type   CHAR(1) NOT NULL,     --must be one character
  6878.  15,Example Datatype,
  6879.     new_value   NUMBER(11, 2),
  6880.  16,Example Datatype,
  6881.     status      CHAR(45),
  6882.  17,Example Datatype,
  6883.     time_tag    DATE NOT NULL);       --must be a date; cannot be null
  6884.  18,Example Datatype,
  6885.  ...
  6886.  19,Example Datatype,
  6887.  
  6888.  20,Example Datatype,
  6889.  
  6890.  21,Example Datatype,
  6891.  See also: variables, number, char, date, create table, drop table,
  6892.  22,Example Datatype,
  6893.            nulls, examples, menu.
  6894.   1,Example Date Functions,
  6895.  
  6896.   2,Example Date Functions,
  6897.  
  6898.   3,Example Date Functions,
  6899.                           Example Date Functions
  6900.   4,Example Date Functions,
  6901.  
  6902.   5,Example Date Functions,
  6903.  Use a date functions calculation to list employees hired since 1982:
  6904.   6,Example Date Functions,
  6905.  
  6906.   7,Example Date Functions,
  6907.  SELECT ename, hiredate                               ENAME    HIREDATE
  6908.   8,Example Date Functions,
  6909.    FROM emp                                           ------------------
  6910.   9,Example Date Functions,
  6911.    WHERE hiredate BETWEEN '1-JAN-82' AND SYSDATE      MILLER   23-JAN-89
  6912.  10,Example Date Functions,
  6913.    ORDER BY hiredate;                                 SCOTT    05-JAN-89
  6914.  11,Example Date Functions,
  6915.                                                       WARD     08-JAN-89
  6916.  12,Example Date Functions,
  6917.                                                          . . .
  6918.  13,Example Date Functions,
  6919.  To list each employee's first review date:
  6920.  14,Example Date Functions,
  6921.  
  6922.  15,Example Date Functions,
  6923.  SELECT ename, hiredate,                    ENAME   HIREDATE   REVIEW_1
  6924.  16,Example Date Functions,
  6925.      ADD_MONTHS(hiredate, 6) "1st Rev"      ----------------------------
  6926.  17,Example Date Functions,
  6927.    FROM emp                                 ADAMS   12-JAN-83  12-JUL-83
  6928.  18,Example Date Functions,
  6929.    ORDER BY ename;                          ALLEN   20-FEB-81  20-AUG-81
  6930.  19,Example Date Functions,
  6931.                                             BLAKE   01-MAY-81  01-NOV-81
  6932.  20,Example Date Functions,
  6933.  "1st Rev" is a column alias.               . . .
  6934.  21,Example Date Functions,
  6935.  
  6936.  22,Example Date Functions,
  6937.  
  6938.  23,Example Date Functions,
  6939.  See also: date functions, select, alias, examples, menu.
  6940.   1,Example Error Handling,
  6941.  
  6942.   2,Example Error Handling,
  6943.  
  6944.   3,Example Error Handling,
  6945.                             Example Error Handling
  6946.   4,Example Error Handling,
  6947.  
  6948.   5,Example Error Handling,
  6949.  DECLARE
  6950.   6,Example Error Handling,
  6951.     bad_employee_num    EXCEPTION;             --user-defined
  6952.   7,Example Error Handling,
  6953.     bad_acct_num        EXCEPTION;             --user-defined
  6954.   8,Example Error Handling,
  6955.     . . .                                      --other declarations
  6956.   9,Example Error Handling,
  6957.  BEGIN
  6958.  10,Example Error Handling,
  6959.     . . .                                      --PL/SQL statements
  6960.  11,Example Error Handling,
  6961.  EXCEPTION
  6962.  12,Example Error Handling,
  6963.     WHEN bad_employee_num OR bad_acct_num THEN ROLLBACK;
  6964.  13,Example Error Handling,
  6965.     WHEN ZERO_DIVIDE THEN                      --a PL/SQL exception
  6966.  14,Example Error Handling,
  6967.         INSERT INTO inventory_table VALUES (product_name, quantity);
  6968.  15,Example Error Handling,
  6969.         COMMIT;
  6970.  16,Example Error Handling,
  6971.  END;
  6972.  17,Example Error Handling,
  6973.  
  6974.  18,Example Error Handling,
  6975.  
  6976.  19,Example Error Handling,
  6977.  See also: error handling, declare, exception, pl/sql exceptions,
  6978.  20,Example Error Handling,
  6979.            rollback, insert, commit, examples, menu.
  6980.   1,Example GROUP BY,
  6981.  
  6982.   2,Example GROUP BY,
  6983.  
  6984.   3,Example GROUP BY,
  6985.                           Example GROUP BY
  6986.   4,Example GROUP BY,
  6987.  
  6988.   5,Example GROUP BY,
  6989.  To display the minimum and maximum salaries of clerks for each of
  6990.   6,Example GROUP BY,
  6991.  the departments in the emp table:
  6992.   7,Example GROUP BY,
  6993.                                         DEPTNO  MIN(SAL)  MAX(SAL)
  6994.   8,Example GROUP BY,
  6995.  SELECT deptno, MIN(sal), MAX(sal)      --------------------------
  6996.   9,Example GROUP BY,
  6997.    FROM emp WHERE job = 'CLERK'             10      1300      1300
  6998.  10,Example GROUP BY,
  6999.    GROUP BY deptno;                         20       800      1100
  7000.  11,Example GROUP BY,
  7001.                                             30       950       950
  7002.  12,Example GROUP BY,
  7003.  
  7004.  13,Example GROUP BY,
  7005.  To limit the query to departments
  7006.  14,Example GROUP BY,
  7007.  whose lowest salary is under 1000:
  7008.  15,Example GROUP BY,
  7009.                                         DEPTNO  MIN(SAL)  MAX(SAL)
  7010.  16,Example GROUP BY,
  7011.  SELECT deptno, MIN(sal), MAX(sal)      --------------------------
  7012.  17,Example GROUP BY,
  7013.    FROM emp WHERE job = 'CLERK'             20       800      1100
  7014.  18,Example GROUP BY,
  7015.    GROUP BY deptno                          30       950       950
  7016.  19,Example GROUP BY,
  7017.    HAVING MIN(sal) < 1000;
  7018.  20,Example GROUP BY,
  7019.  
  7020.  21,Example GROUP BY,
  7021.  
  7022.  22,Example GROUP BY,
  7023.  
  7024.  23,Example GROUP BY,
  7025.  See also: group by, group functions, select, examples, menu.
  7026.   1,Example Group Functions,
  7027.  
  7028.   2,Example Group Functions,
  7029.  
  7030.   3,Example Group Functions,
  7031.                        Example Group Functions
  7032.   4,Example Group Functions,
  7033.  
  7034.   5,Example Group Functions,
  7035.  Here are some of the ways group functions can be used in queries:
  7036.   6,Example Group Functions,
  7037.  
  7038.   7,Example Group Functions,
  7039.  SELECT 12 * AVG(sal)             Finds average        12*AVG(sal)
  7040.   8,Example Group Functions,
  7041.    FROM emp                       yearly pay of       ------------
  7042.   9,Example Group Functions,
  7043.    WHERE job = 'CLERK';           clerks.                    12450
  7044.  10,Example Group Functions,
  7045.  
  7046.  11,Example Group Functions,
  7047.  
  7048.  12,Example Group Functions,
  7049.  SELECT COUNT(comm) eligible      Counts those who        ELIGIBLE
  7050.  13,Example Group Functions,
  7051.    FROM emp;                      are eligible for        --------
  7052.  14,Example Group Functions,
  7053.                                   a commission.                  4
  7054.  15,Example Group Functions,
  7055.  
  7056.  16,Example Group Functions,
  7057.  SELECT COUNT(*)                  Counts employees        COUNT(*)
  7058.  17,Example Group Functions,
  7059.    FROM emp                       in Department 20.       --------
  7060.  18,Example Group Functions,
  7061.    WHERE deptno = 20;             COUNT(*) tallies               5
  7062.  19,Example Group Functions,
  7063.                                   rows meeting the
  7064.  20,Example Group Functions,
  7065.                                   WHERE condition.
  7066.  21,Example Group Functions,
  7067.  
  7068.  22,Example Group Functions,
  7069.  
  7070.  23,Example Group Functions,
  7071.  See also: group functions, query, select, where, examples, menu.
  7072.   1,Example INSERT,
  7073.  
  7074.   2,Example INSERT,
  7075.  
  7076.   3,Example INSERT,
  7077.                             Example INSERT
  7078.   4,Example INSERT,
  7079.  
  7080.   5,Example INSERT,
  7081.  To add a new employee to the emp table:
  7082.   6,Example INSERT,
  7083.  
  7084.   7,Example INSERT,
  7085.  INSERT INTO emp(empno, ename, job, mgr, hiredate, sal, comm, deptno)
  7086.   8,Example INSERT,
  7087.    VALUES(7979, 'POWERS', 'ANALYST', 7839, '1-JUN-89', 3600, NULL, 10);
  7088.   9,Example INSERT,
  7089.  
  7090.  10,Example INSERT,
  7091.  
  7092.  11,Example INSERT,
  7093.  To insert information from another table, replace the VALUES list
  7094.  12,Example INSERT,
  7095.  with a subquery:
  7096.  13,Example INSERT,
  7097.  
  7098.  14,Example INSERT,
  7099.  INSERT INTO bonus (ename, job, sal, comm)
  7100.  15,Example INSERT,
  7101.    SELECT ename, job, sal, comm
  7102.  16,Example INSERT,
  7103.      FROM emp
  7104.  17,Example INSERT,
  7105.      WHERE ename = 'KING';
  7106.  18,Example INSERT,
  7107.  
  7108.  19,Example INSERT,
  7109.  
  7110.  20,Example INSERT,
  7111.  
  7112.  21,Example INSERT,
  7113.  See also: insert, subquery, select, examples, menu.
  7114.   1,Example LIKE,
  7115.  
  7116.   2,Example LIKE,
  7117.  
  7118.   3,Example LIKE,
  7119.                            Example LIKE
  7120.   4,Example LIKE,
  7121.  
  7122.   5,Example LIKE,
  7123.  To find employees who have hyphenated names:
  7124.   6,Example LIKE,
  7125.  
  7126.   7,Example LIKE,
  7127.          SELECT ename
  7128.   8,Example LIKE,
  7129.            FROM emp
  7130.   9,Example LIKE,
  7131.            WHERE ename LIKE '%-%'
  7132.  10,Example LIKE,
  7133.            ORDER BY ename;
  7134.  11,Example LIKE,
  7135.  
  7136.  12,Example LIKE,
  7137.  
  7138.  13,Example LIKE,
  7139.   To find employees who have names beginning  with 'M':
  7140.  14,Example LIKE,
  7141.  
  7142.  15,Example LIKE,
  7143.           SELECT ename, job, deptno
  7144.  16,Example LIKE,
  7145.             FROM emp
  7146.  17,Example LIKE,
  7147.             WHERE ename LIKE 'M%';
  7148.  18,Example LIKE,
  7149.  
  7150.  19,Example LIKE,
  7151.  
  7152.  20,Example LIKE,
  7153.   See also: like, select, order by, examples, menu.
  7154.   1,Example LOCK TABLE,
  7155.  
  7156.   2,Example LOCK TABLE,
  7157.  
  7158.   3,Example LOCK TABLE,
  7159.                            Example LOCK TABLE
  7160.   4,Example LOCK TABLE,
  7161.  
  7162.   5,Example LOCK TABLE,
  7163.  This statement prohibits any activity except queries on the emp table;
  7164.   6,Example LOCK TABLE,
  7165.  NOWAIT returns control if the table is already locked by another user:
  7166.   7,Example LOCK TABLE,
  7167.  
  7168.   8,Example LOCK TABLE,
  7169.          LOCK TABLE emp IN EXCLUSIVE MODE NOWAIT;
  7170.   9,Example LOCK TABLE,
  7171.          rest_of_transaction
  7172.  10,Example LOCK TABLE,
  7173.          COMMIT;
  7174.  11,Example LOCK TABLE,
  7175.  
  7176.  12,Example LOCK TABLE,
  7177.  
  7178.  13,Example LOCK TABLE,
  7179.  The following statement locks the accounts table in share mode, which
  7180.  14,Example LOCK TABLE,
  7181.  permits queries, but prohibits inserts, updates, and deletes:
  7182.  15,Example LOCK TABLE,
  7183.  
  7184.  16,Example LOCK TABLE,
  7185.          LOCK TABLE accounts IN SHARE MODE;
  7186.  17,Example LOCK TABLE,
  7187.          rest_of_transaction
  7188.  18,Example LOCK TABLE,
  7189.          COMMIT;
  7190.  19,Example LOCK TABLE,
  7191.  
  7192.  20,Example LOCK TABLE,
  7193.  
  7194.  21,Example LOCK TABLE,
  7195.  See also: lock table, query, commit, examples, menu.
  7196.   1,Example NEXTVAL,
  7197.  
  7198.   2,Example NEXTVAL,
  7199.  
  7200.   3,Example NEXTVAL,
  7201.                            Example NEXTVAL
  7202.   4,Example NEXTVAL,
  7203.  
  7204.   5,Example NEXTVAL,
  7205.  Suppose a sequence named custnoseq is defined:
  7206.   6,Example NEXTVAL,
  7207.  
  7208.   7,Example NEXTVAL,
  7209.    CREATE SEQUENCE custnoseq INCREMENT BY 10;
  7210.   8,Example NEXTVAL,
  7211.  
  7212.   9,Example NEXTVAL,
  7213.  If there is a customer table  with columns custno, fname, and lname,
  7214.  10,Example NEXTVAL,
  7215.  custnoseq.NEXTVAL is used with INSERT to assign a new, unique custno
  7216.  11,Example NEXTVAL,
  7217.  for Stanley Daleson. The client number will be equal to the previous
  7218.  12,Example NEXTVAL,
  7219.  highest client number plus 10:
  7220.  13,Example NEXTVAL,
  7221.  
  7222.  14,Example NEXTVAL,
  7223.    INSERT INTO cust VALUES (custnoseq.NEXTVAL, 'Stanley', 'Daleson');
  7224.  15,Example NEXTVAL,
  7225.  
  7226.  16,Example NEXTVAL,
  7227.  Assuming a table named custbal with columns custno and bal, execute
  7228.  17,Example NEXTVAL,
  7229.  this statement next to insert a new row with an outstanding balance
  7230.  18,Example NEXTVAL,
  7231.  and the same custno just added to the customers table:
  7232.  19,Example NEXTVAL,
  7233.  
  7234.  20,Example NEXTVAL,
  7235.    INSERT INTO custbal VALUES (custnoseq.CURRVAL, 144.12);
  7236.  21,Example NEXTVAL,
  7237.  
  7238.  22,Example NEXTVAL,
  7239.  
  7240.  23,Example NEXTVAL,
  7241.  See also: nextval, insert, sequences, pseudo-columns, examples, menu.
  7242.   1,Example Nulls,
  7243.  
  7244.   2,Example Nulls,
  7245.  
  7246.   3,Example Nulls,
  7247.                              Example Nulls
  7248.   4,Example Nulls,
  7249.  
  7250.   5,Example Nulls,
  7251.  The comm column has a value of null for any employee ineligible for
  7252.   6,Example Nulls,
  7253.  a commission.  To see only employees eligible for commissions:
  7254.   7,Example Nulls,
  7255.  
  7256.   8,Example Nulls,
  7257.      SELECT ename, comm, sal, deptno      ENAME   COMM   SAL  DEPTNO
  7258.   9,Example Nulls,
  7259.        FROM emp                           --------------------------
  7260.  10,Example Nulls,
  7261.        WHERE comm IS NOT NULL             MARTIN  1400  1250      30
  7262.  11,Example Nulls,
  7263.        ORDER BY comm DESC;                WARD     500  1250      30
  7264.  12,Example Nulls,
  7265.                                           ALLEN    300  1600      30
  7266.  13,Example Nulls,
  7267.                                           TURNER     0  1500      30
  7268.  14,Example Nulls,
  7269.  
  7270.  15,Example Nulls,
  7271.  Use IS NOT or IS; using <> or = with NULL always evaluates to FALSE.
  7272.  16,Example Nulls,
  7273.  
  7274.  17,Example Nulls,
  7275.  Two adjacent apostrophes (0 length CHAR value) set a column to null:
  7276.  18,Example Nulls,
  7277.  
  7278.  19,Example Nulls,
  7279.      INSERT INTO emp VALUES (8905, 'POST', '', 7698,...);
  7280.  20,Example Nulls,
  7281.  
  7282.  21,Example Nulls,
  7283.  
  7284.  22,Example Nulls,
  7285.  See also: nulls, select, insert, examples, menu.
  7286.   1,Example Numeric FOR,
  7287.  
  7288.   2,Example Numeric FOR,
  7289.  
  7290.   3,Example Numeric FOR,
  7291.                       Example Numeric FOR
  7292.   4,Example Numeric FOR,
  7293.  
  7294.   5,Example Numeric FOR,
  7295.  DECLARE
  7296.   6,Example Numeric FOR,
  7297.     x   NUMBER := 100;
  7298.   7,Example Numeric FOR,
  7299.  BEGIN
  7300.   8,Example Numeric FOR,
  7301.     FOR i in 1..4 LOOP
  7302.   9,Example Numeric FOR,
  7303.        IF MOD(i/2) = 0 THEN                     --i is even
  7304.  10,Example Numeric FOR,
  7305.           INSERT INTO temp VALUES (i, x, 'an even index');
  7306.  11,Example Numeric FOR,
  7307.        ELSE
  7308.  12,Example Numeric FOR,
  7309.           INSERT INTO temp VALUES (i, x, 'an odd index');
  7310.  13,Example Numeric FOR,
  7311.        END IF;
  7312.  14,Example Numeric FOR,
  7313.        x := x + 25;
  7314.  15,Example Numeric FOR,
  7315.     END LOOP;
  7316.  16,Example Numeric FOR,
  7317.     COMMIT;                     COL1   COL2    MESSAGE
  7318.  17,Example Numeric FOR,
  7319.  END;                           ----------------------------
  7320.  18,Example Numeric FOR,
  7321.                                    1    100    an odd index
  7322.  19,Example Numeric FOR,
  7323.  SQL>  SELECT * FROM temp          2    125    an even index
  7324.  20,Example Numeric FOR,
  7325.          ORDER BY col1;            3    150    an odd index
  7326.  21,Example Numeric FOR,
  7327.                                    4    175    an even index
  7328.  22,Example Numeric FOR,
  7329.  
  7330.  23,Example Numeric FOR,
  7331.  
  7332.  24,Example Numeric FOR,
  7333.  See also: numeric for, number, if, insert, examples, menu.
  7334.   1,Example Outer Join,
  7335.  
  7336.   2,Example Outer Join,
  7337.  
  7338.   3,Example Outer Join,
  7339.                           Example Outer Join
  7340.   4,Example Outer Join,
  7341.  
  7342.   5,Example Outer Join,
  7343.  To join tables EMP and DEPT (an outer join) and list departments 30
  7344.   6,Example Outer Join,
  7345.  and 40, with or without employees:
  7346.   7,Example Outer Join,
  7347.                                           ENAME  DEPTNO   DNAME
  7348.   8,Example Outer Join,
  7349.                                           --------------------------
  7350.   9,Example Outer Join,
  7351.  SELECT ename, deptno, dname                              OPERATIONS
  7352.  10,Example Outer Join,
  7353.    FROM emp, dept                         ALLEN      30   SALES
  7354.  11,Example Outer Join,
  7355.    WHERE dept.deptno = emp.deptno (+)     BLAKE      30   SALES
  7356.  12,Example Outer Join,
  7357.    AND dept.deptno IN (30, 40)            JAMES      30   SALES
  7358.  13,Example Outer Join,
  7359.    ORDER BY ename;                        MARTIN     30   SALES
  7360.  14,Example Outer Join,
  7361.                                           TURNER     30   SALES
  7362.  15,Example Outer Join,
  7363.                                           WARD       30   SALES
  7364.  16,Example Outer Join,
  7365.  
  7366.  17,Example Outer Join,
  7367.  
  7368.  18,Example Outer Join,
  7369.  
  7370.  19,Example Outer Join,
  7371.  See also: outer join, join, select, examples, menu.
  7372.   1,Example Query,
  7373.  
  7374.   2,Example Query,
  7375.  
  7376.   3,Example Query,
  7377.                              Example Query
  7378.   4,Example Query,
  7379.  
  7380.   5,Example Query,
  7381.  Find managers     SELECT ename, sal, job       ENAME      SAL  JOB
  7382.   6,Example Query,
  7383.  and employees       FROM emp                   -------------------------
  7384.   7,Example Query,
  7385.  with a salary       WHERE job = 'MANAGER'      KING      5000  PRESIDENT
  7386.   8,Example Query,
  7387.  $5000 or more;      OR sal >= 5000             JONES     2975  MANAGER
  7388.   9,Example Query,
  7389.  show in order       ORDER BY sal DESC;         BLAKE     2850  MANAGER
  7390.  10,Example Query,
  7391.  of salary  in                                  CLARK     2450  MANAGER
  7392.  11,Example Query,
  7393.  query results.
  7394.  12,Example Query,
  7395.  
  7396.  13,Example Query,
  7397.  
  7398.  14,Example Query,
  7399.  List names and    SELECT ename, job, deptno    ENAME     JOB      DEPTNO
  7400.  15,Example Query,
  7401.  departments of      FROM emp                   -------------------------
  7402.  16,Example Query,
  7403.  employees  who      WHERE job IN ('ANALYST',   ADAMS     CLERK        20
  7404.  17,Example Query,
  7405.  are  analysts,      'CLERK', 'PRESIDENT')      FORD      ANALYST      20
  7406.  18,Example Query,
  7407.  clerks, or the      ORDER BY ename;            JAMES     CLERK        20
  7408.  19,Example Query,
  7409.  president.                                     KING      PRESIDENT    10
  7410.  20,Example Query,
  7411.                                                 ...
  7412.  21,Example Query,
  7413.  
  7414.  22,Example Query,
  7415.  
  7416.  23,Example Query,
  7417.  See also: query, select, from, examples, menu.
  7418.   1,Example ROLLBACK,
  7419.  
  7420.   2,Example ROLLBACK,
  7421.  
  7422.   3,Example ROLLBACK,
  7423.                            Example ROLLBACK
  7424.   4,Example ROLLBACK,
  7425.  
  7426.   5,Example ROLLBACK,
  7427.  In updating salaries, you can include a number of savepoints, each
  7428.   6,Example ROLLBACK,
  7429.  with a unique name.  To discard changes made to the database since
  7430.   7,Example ROLLBACK,
  7431.  a particular savepoint, issue a ROLLBACK statement that references
  7432.   8,Example ROLLBACK,
  7433.  the name of that SAVEPOINT:
  7434.   9,Example ROLLBACK,
  7435.  
  7436.  10,Example ROLLBACK,
  7437.       UPDATE emp SET sal = 2000 WHERE ename = 'BLAKE';
  7438.  11,Example ROLLBACK,
  7439.       SAVEPOINT blakesal;
  7440.  12,Example ROLLBACK,
  7441.       UPDATE emp SET sal = 1500 WHERE ename = 'CLARK';
  7442.  13,Example ROLLBACK,
  7443.       SELECT SUM(sal) FROM emp;
  7444.  14,Example ROLLBACK,
  7445.       ROLLBACK TO SAVEPOINT blakesal;   --undoes change to Clark's sal
  7446.  15,Example ROLLBACK,
  7447.       COMMIT;
  7448.  16,Example ROLLBACK,
  7449.  
  7450.  17,Example ROLLBACK,
  7451.  
  7452.  18,Example ROLLBACK,
  7453.  See also: rollback, savepoint, update, commit, examples, menu.
  7454.   1,Example SELECT INTO,
  7455.  
  7456.   2,Example SELECT INTO,
  7457.  
  7458.   3,Example SELECT INTO,
  7459.                            Example SELECT INTO
  7460.   4,Example SELECT INTO,
  7461.  
  7462.   5,Example SELECT INTO,
  7463.  DECLARE
  7464.   6,Example SELECT INTO,
  7465.     dept_rec       dept%ROWTYPE;
  7466.   7,Example SELECT INTO,
  7467.     name           emp.ename%TYPE;
  7468.   8,Example SELECT INTO,
  7469.     job_title      empjob%TYPE;
  7470.   9,Example SELECT INTO,
  7471.     wages          emp.sal%TYPE;
  7472.  10,Example SELECT INTO,
  7473.  BEGIN
  7474.  11,Example SELECT INTO,
  7475.     SELECT * INTO dept_rec
  7476.  12,Example SELECT INTO,
  7477.       FROM dept
  7478.  13,Example SELECT INTO,
  7479.       WHERE deptno = 20;
  7480.  14,Example SELECT INTO,
  7481.     SELECT ename, job, sal INTO name, job_title, wages
  7482.  15,Example SELECT INTO,
  7483.       FROM emp
  7484.  16,Example SELECT INTO,
  7485.       WHERE empno = 1440;
  7486.  17,Example SELECT INTO,
  7487.     ...          --rest of block
  7488.  18,Example SELECT INTO,
  7489.  END;
  7490.  19,Example SELECT INTO,
  7491.  
  7492.  20,Example SELECT INTO,
  7493.  
  7494.  21,Example SELECT INTO,
  7495.  See also: select into, attributes (%ROWTYPE, %TYPE), examples, menu.
  7496.   1,Example SELECT List,
  7497.  
  7498.   2,Example SELECT List,
  7499.  
  7500.   3,Example SELECT List,
  7501.                           Example SELECT List
  7502.   4,Example SELECT List,
  7503.  
  7504.   5,Example SELECT List,
  7505.  The SELECT list may contain...
  7506.   6,Example SELECT List,
  7507.  
  7508.   7,Example SELECT List,
  7509.  
  7510.   8,Example SELECT List,
  7511.   -  Column names and aliases:      SELECT ename, deptno no, dname dept
  7512.   9,Example SELECT List,
  7513.                                       FROM emp...
  7514.  10,Example SELECT List,
  7515.  
  7516.  11,Example SELECT List,
  7517.  
  7518.  12,Example SELECT List,
  7519.   -  Group functions:               SELECT 12 * AVG(sal + comm)
  7520.  13,Example SELECT List,
  7521.                                       FROM emp
  7522.  14,Example SELECT List,
  7523.                                       WHERE job = 'SALESMAN'
  7524.  15,Example SELECT List,
  7525.  
  7526.  16,Example SELECT List,
  7527.  
  7528.  17,Example SELECT List,
  7529.   -  Non-Group functions:           SELECT TO_CHAR(hiredate, 'YYYY'),
  7530.  18,Example SELECT List,
  7531.                                            INITCAP(ename), sal
  7532.  19,Example SELECT List,
  7533.                                       FROM emp...
  7534.  20,Example SELECT List,
  7535.  
  7536.  21,Example SELECT List,
  7537.  
  7538.  22,Example SELECT List,
  7539.  See also: select list, alias, select, group functions, examples, menu.
  7540.   1,Example SET TRANSACTION,
  7541.  
  7542.   2,Example SET TRANSACTION,
  7543.  
  7544.   3,Example SET TRANSACTION,
  7545.                        Example SET TRANSACTION
  7546.   4,Example SET TRANSACTION,
  7547.  
  7548.   5,Example SET TRANSACTION,
  7549.  A company runs the following statements at the end of each month to
  7550.   6,Example SET TRANSACTION,
  7551.  inventory the number of ships and containers it owns:
  7552.   7,Example SET TRANSACTION,
  7553.  
  7554.   8,Example SET TRANSACTION,
  7555.          COMMIT;
  7556.   9,Example SET TRANSACTION,
  7557.          SET TRANSACTION READ ONLY;
  7558.  10,Example SET TRANSACTION,
  7559.          SELECT COUNT(*) FROM ship;
  7560.  11,Example SET TRANSACTION,
  7561.          SELECT COUNT(*) FROM container;
  7562.  12,Example SET TRANSACTION,
  7563.          COMMIT;
  7564.  13,Example SET TRANSACTION,
  7565.  
  7566.  14,Example SET TRANSACTION,
  7567.  The last COMMIT is used to end the read-only transaction; there are
  7568.  15,Example SET TRANSACTION,
  7569.  no changes to the database to make permanent.
  7570.  16,Example SET TRANSACTION,
  7571.  
  7572.  17,Example SET TRANSACTION,
  7573.  Every SELECT in a read-only transaction refers to the same snapshot
  7574.  18,Example SET TRANSACTION,
  7575.  of the database, giving a multi-table, multi-query, read-consistent
  7576.  19,Example SET TRANSACTION,
  7577.  view.
  7578.  20,Example SET TRANSACTION,
  7579.  
  7580.  21,Example SET TRANSACTION,
  7581.  
  7582.  22,Example SET TRANSACTION,
  7583.  See also: set transaction, group functions, commit, examples, menu.
  7584.   1,Example Set Operators,
  7585.  
  7586.   2,Example Set Operators,
  7587.  
  7588.   3,Example Set Operators,
  7589.                           Example Set Operators
  7590.   4,Example Set Operators,
  7591.  
  7592.   5,Example Set Operators,
  7593.  If you have three tables like emp, and want to list an emp employee
  7594.   6,Example Set Operators,
  7595.  with the same salary as Scott in Belmont, Jones in Chicago, or Smith
  7596.   7,Example Set Operators,
  7597.  in New York:
  7598.   8,Example Set Operators,
  7599.                     SELECT ename, job, sal
  7600.   9,Example Set Operators,
  7601.                        FROM emp
  7602.  10,Example Set Operators,
  7603.                        WHERE sal IN
  7604.  11,Example Set Operators,
  7605.                            (SELECT sal
  7606.  12,Example Set Operators,
  7607.                                FROM belmont
  7608.  13,Example Set Operators,
  7609.                                WHERE ename = 'SCOTT'
  7610.  14,Example Set Operators,
  7611.                     UNION
  7612.  15,Example Set Operators,
  7613.                     SELECT sal
  7614.  16,Example Set Operators,
  7615.                        FROM chicago
  7616.  17,Example Set Operators,
  7617.                        WHERE ename = 'JONES'
  7618.  18,Example Set Operators,
  7619.                     UNION
  7620.  19,Example Set Operators,
  7621.                     SELECT sal
  7622.  20,Example Set Operators,
  7623.                        FROM new_york
  7624.  21,Example Set Operators,
  7625.                        WHERE ename = 'SMITH');
  7626.  22,Example Set Operators,
  7627.  
  7628.  23,Example Set Operators,
  7629.  A query with the set operators UNION, INTERSECT, or MINUS must select
  7630.  24,Example Set Operators,
  7631.  the same number of columns, and corresponding columns must have the
  7632.  25,Example Set Operators,
  7633.  same datatype.
  7634.  26,Example Set Operators,
  7635.  
  7636.  27,Example Set Operators,
  7637.  See also: set operators, select, query, examples, menu.
  7638.   1,Example Simple Join,
  7639.  
  7640.   2,Example Simple Join,
  7641.  
  7642.   3,Example Simple Join,
  7643.                        Example Simple Join
  7644.   4,Example Simple Join,
  7645.  
  7646.   5,Example Simple Join,
  7647.  To list with salary, department, and location each employees who earns
  7648.   6,Example Simple Join,
  7649.  $3000 or more per month, use a simple join:
  7650.   7,Example Simple Join,
  7651.  
  7652.   8,Example Simple Join,
  7653.  SELECT ename, sal, dname, loc       ENAME   SAL   DNAME       LOC
  7654.   9,Example Simple Join,
  7655.    FROM emp, dept                    ----------------------------------
  7656.  10,Example Simple Join,
  7657.    WHERE emp.deptno = dept.deptno    KING   5000   ACCOUNTING  NEW YORK
  7658.  11,Example Simple Join,
  7659.    AND sal >= 3000;                  SCOTT  3000   RESEARCH    DALLAS
  7660.  12,Example Simple Join,
  7661.                                      FORD   3000   RESEARCH    DALLAS
  7662.  13,Example Simple Join,
  7663.  
  7664.  14,Example Simple Join,
  7665.  
  7666.  15,Example Simple Join,
  7667.  To find each employee's salary grade:
  7668.  16,Example Simple Join,
  7669.                                             ENAME   JOB     GRADE   SAL
  7670.  17,Example Simple Join,
  7671.  SELECT ename, job, grade, sal              ---------------------------
  7672.  18,Example Simple Join,
  7673.    FROM emp, salgrade                       ADAMS   CLERK       1  1100
  7674.  19,Example Simple Join,
  7675.    WHERE sal BETWEEN losal AND hisal        ALLEN   SALESMAN    3  1600
  7676.  20,Example Simple Join,
  7677.    ORDER BY ename                           BLAKE   MANAGER     4  2850
  7678.  21,Example Simple Join,
  7679.                                             CLARK   MANAGER     4  2450
  7680.  22,Example Simple Join,
  7681.  
  7682.  23,Example Simple Join,
  7683.  See also: simple join, select, examples, menu.
  7684.   1,Example Subquery,
  7685.  
  7686.   2,Example Subquery,
  7687.  
  7688.   3,Example Subquery,
  7689.                          Example Subquery
  7690.   4,Example Subquery,
  7691.  
  7692.   5,Example Subquery,
  7693.  This subquery gives each MANAGER in the DALLAS office a salary equal
  7694.   6,Example Subquery,
  7695.  to the company's highest paid employee:
  7696.   7,Example Subquery,
  7697.  
  7698.   8,Example Subquery,
  7699.     UPDATE emp
  7700.   9,Example Subquery,
  7701.        SET sal = (SELECT MAX(sal) FROM emp)
  7702.  10,Example Subquery,
  7703.        WHERE JOB = 'MANAGER'
  7704.  11,Example Subquery,
  7705.          AND DEPTNO IN (SELECT deptno FROM dept WHERE loc = 'DALLAS');
  7706.  12,Example Subquery,
  7707.  
  7708.  13,Example Subquery,
  7709.  Use = to equate a field with a subquery if the subquery returns only
  7710.  14,Example Subquery,
  7711.  one value; use IN instead of = if a subquery returns multiple values.
  7712.  15,Example Subquery,
  7713.  
  7714.  16,Example Subquery,
  7715.  To list employees who got a bonus without changing jobs:
  7716.  17,Example Subquery,
  7717.  
  7718.  18,Example Subquery,
  7719.     SELECT empno, ename
  7720.  19,Example Subquery,
  7721.       FROM emp
  7722.  20,Example Subquery,
  7723.       WHERE (job, ename) = (SELECT job, ename FROM bonus);
  7724.  21,Example Subquery,
  7725.  
  7726.  22,Example Subquery,
  7727.  
  7728.  23,Example Subquery,
  7729.  See also: subquery, update, select, where, comparison, examples, menu.
  7730.   1,Example WHERE CURRENT OF,
  7731.  
  7732.   2,Example WHERE CURRENT OF,
  7733.  
  7734.   3,Example WHERE CURRENT OF,
  7735.                            Example WHERE CURRENT OF
  7736.   4,Example WHERE CURRENT OF,
  7737.  
  7738.   5,Example WHERE CURRENT OF,
  7739.   This PL/SQL code does the actions listed in a table called today,
  7740.   6,Example WHERE CURRENT OF,
  7741.   setting status to DONE for actions completed; for example, actions 
  7742.   7,Example WHERE CURRENT OF,
  7743.   to be taken on a table of account balances at the end of the day.
  7744.   8,Example WHERE CURRENT OF,
  7745.  
  7746.   9,Example WHERE CURRENT OF,
  7747.           DECLARE
  7748.  10,Example WHERE CURRENT OF,
  7749.             CURSOR c1 IS SELECT action, acct FROM today
  7750.  11,Example WHERE CURRENT OF,
  7751.                FOR UPDATE OF status;
  7752.  12,Example WHERE CURRENT OF,
  7753.             the_action   today.act%TYPE;
  7754.  13,Example WHERE CURRENT OF,
  7755.             acct_num     today.acct%TYPE;
  7756.  14,Example WHERE CURRENT OF,
  7757.           BEGIN
  7758.  15,Example WHERE CURRENT OF,
  7759.             OPEN c1;
  7760.  16,Example WHERE CURRENT OF,
  7761.             LOOP
  7762.  17,Example WHERE CURRENT OF,
  7763.               FETCH c1 INTO the_action, acct_num;
  7764.  18,Example WHERE CURRENT OF,
  7765.                 EXIT WHEN c1%NOTFOUND;
  7766.  19,Example WHERE CURRENT OF,
  7767.               ...       --statements to perform actions
  7768.  20,Example WHERE CURRENT OF,
  7769.               UPDATE today SET status = 'done'
  7770.  21,Example WHERE CURRENT OF,
  7771.                 WHERE CURRENT OF c1;
  7772.  22,Example WHERE CURRENT OF,
  7773.             END LOOP;
  7774.  23,Example WHERE CURRENT OF,
  7775.             CLOSE c1;
  7776.  24,Example WHERE CURRENT OF,
  7777.             COMMIT;
  7778.  25,Example WHERE CURRENT OF,
  7779.           END;
  7780.  26,Example WHERE CURRENT OF,
  7781.  
  7782.  27,Example WHERE CURRENT OF,
  7783.  See also: where current of, cursors, declare, for update of, open, loop,
  7784.  28,Example WHERE CURRENT OF,
  7785.            fetch, exit plsql, update, examples, menu.
  7786.   1,Example WHILE,
  7787.  
  7788.   2,Example WHILE,
  7789.  
  7790.   3,Example WHILE,
  7791.                             Example WHILE
  7792.   4,Example WHILE,
  7793.  
  7794.   5,Example WHILE,
  7795.  Suppose you now have over $50,000 to spend on employee salaries, and
  7796.   6,Example WHILE,
  7797.  wish to increase everyone's salary proportionally.  Use this loop to
  7798.   7,Example WHILE,
  7799.  increase each person's salary by 10% until the total of all salaries
  7800.   8,Example WHILE,
  7801.  equals or exceeds $50,000:
  7802.   9,Example WHILE,
  7803.  
  7804.  10,Example WHILE,
  7805.           DECLARE
  7806.  11,Example WHILE,
  7807.              total_sal    NUMBER(5);
  7808.  12,Example WHILE,
  7809.           BEGIN
  7810.  13,Example WHILE,
  7811.              SELECT SUM(sal) INTO total_sal FROM emp;
  7812.  14,Example WHILE,
  7813.              WHILE total_sal < 50000 LOOP
  7814.  15,Example WHILE,
  7815.                 UPDATE emp SET sal = sal * 1.10;
  7816.  16,Example WHILE,
  7817.                 SELECT SUM(sal) INTO total_sal FROM emp;
  7818.  17,Example WHILE,
  7819.              END LOOP;
  7820.  18,Example WHILE,
  7821.           END;
  7822.  19,Example WHILE,
  7823.  
  7824.  20,Example WHILE,
  7825.  
  7826.  21,Example WHILE,
  7827.  See also: while, declare, number, select into, update, examples, menu.
  7828.   1,Examples,
  7829.  
  7830.   2,Examples,
  7831.  
  7832.   3,Examples,
  7833.                                  Examples
  7834.   4,Examples,
  7835.  
  7836.   5,Examples,
  7837.  Below are examples of SQL and PL/SQL.  Enter help example and a topic name
  7838.   6,Examples,
  7839.  for an example; enter help exam to see examples in alphabetical order; enter
  7840.   7,Examples,
  7841.  a topic name without example for a description of that topic.  Words in
  7842.   8,Examples,
  7843.  (parentheses) are for clarity; they're not part of the text you enter.
  7844.   9,Examples,
  7845.  
  7846.  10,Examples,
  7847.  example connect by (and start with)   example nextval (and currval)
  7848.  11,Examples,
  7849.  example conversion (functions)        example nulls (null values)
  7850.  12,Examples,
  7851.  example correlated subquery           example numeric for (loop with if)
  7852.  13,Examples,
  7853.  example cursor for (loop)             example outer join
  7854.  14,Examples,
  7855.  example cursors (with insert into)    example query
  7856.  15,Examples,
  7857.  example datatype (parameters)         example rollback (to a savepoint)
  7858.  16,Examples,
  7859.  example date functions (arithmetic)   example select list
  7860.  17,Examples,
  7861.  example delete (with rowid)           example select into
  7862.  18,Examples,
  7863.  example error handling                example set operators
  7864.  19,Examples,
  7865.  example formats (number and date)     example set transaction (read only)
  7866.  20,Examples,
  7867.  example group by (and having)         example simple join
  7868.  21,Examples,
  7869.  example group functions               example subquery
  7870.  22,Examples,
  7871.  example insert                        example where current of
  7872.  23,Examples,
  7873.  example like (operator)               example while (loop)
  7874.  24,Examples,
  7875.  example lock table                    See also:  select, commands, menu.
  7876.   1,Example Formats,
  7877.  
  7878.   2,Example Formats,
  7879.  
  7880.   3,Example Formats,
  7881.                           Example Formats
  7882.   4,Example Formats,
  7883.  
  7884.   5,Example Formats,
  7885.  Note how the number formats and date formats affect the output:
  7886.   6,Example Formats,
  7887.  
  7888.   7,Example Formats,
  7889.  
  7890.   8,Example Formats,
  7891.  SELECT TO_CHAR(hiredate, 'MM-DD-YY') hired,    HIRED    MONTHLY  ENAME
  7892.   9,Example Formats,
  7893.         TO_CHAR(sal, '$9999') monthly, ename    -----------------------
  7894.  10,Example Formats,
  7895.    FROM emp                                     06-09-89   $2450  CLARK
  7896.  11,Example Formats,
  7897.    WHERE sal >= 2000                            05-01-89   $2850  BLAKE
  7898.  12,Example Formats,
  7899.    ORDER BY sal;                                04-02-89   $2975  JONES
  7900.  13,Example Formats,
  7901.                                                 01-05-89   $3000  SCOTT
  7902.  14,Example Formats,
  7903.                                                 12-03-89   $3000  FORD
  7904.  15,Example Formats,
  7905.                                                 11-17-89   $5000  KING
  7906.  16,Example Formats,
  7907.  
  7908.  17,Example Formats,
  7909.  
  7910.  18,Example Formats,
  7911.  See also: format dates, format numbers, format modifiers, conversion,
  7912.  19,Example Formats,
  7913.            select, examples, menu.
  7914.   1,Expression Forms,
  7915.  
  7916.   2,Expression Forms,
  7917.  
  7918.   3,Expression Forms,
  7919.                                Expression Forms
  7920.   4,Expression Forms,
  7921.  
  7922.   5,Expression Forms,
  7923.      Form of Expression    Possible SQL Elements
  7924.   6,Expression Forms,
  7925.  ---------------------------------------------------------------------------
  7926.   7,Expression Forms,
  7927.      Column, constant,     table.column, table.ROWID, ROWNUM, text, number,
  7928.   8,Expression Forms,
  7929.      or special value      sequence.NEXTVAL, sequence.CURRVAL, NULL, LEVEL,
  7930.   9,Expression Forms,
  7931.                            SYSDATE, UID, USER
  7932.  10,Expression Forms,
  7933.  
  7934.  11,Expression Forms,
  7935.      Bind variable         :variable
  7936.  12,Expression Forms,
  7937.  
  7938.  13,Expression Forms,
  7939.      Function reference    function_name(DISTINCT or ALL expr, expr...)
  7940.  14,Expression Forms,
  7941.  
  7942.  15,Expression Forms,
  7943.      A combination of      (expr), +expr, -expr, PRIOR expr, expr*expr,
  7944.  16,Expression Forms,
  7945.      other expressions     expr/expr, expr+expr, expr-expr, expr||expr
  7946.  17,Expression Forms,
  7947.  
  7948.  18,Expression Forms,
  7949.      List of expressions
  7950.  19,Expression Forms,
  7951.      within parentheses    (expr1, expr2, expr3, expr4,...)
  7952.  20,Expression Forms,
  7953.  
  7954.  21,Expression Forms,
  7955.  
  7956.  22,Expression Forms,
  7957.  See also: expressions, nextval, pseudo-columns, menu.
  7958.   1,Expressions,
  7959.  
  7960.   2,Expressions,
  7961.                                Expressions
  7962.   3,Expressions,
  7963.  
  7964.   4,Expressions,
  7965.  A SQL expression is a combination of literals, variables, constants,
  7966.   5,Expressions,
  7967.  and operations on their values. Expressions return a value with the
  7968.   6,Expressions,
  7969.  same datatype as the expression's components.
  7970.   7,Expressions,
  7971.  
  7972.   8,Expressions,
  7973.      You can use expressions in:
  7974.   9,Expressions,
  7975.         -  the SELECT list
  7976.  10,Expressions,
  7977.         -  conditions of the WHERE and HAVING clauses
  7978.  11,Expressions,
  7979.         -  the CONNECT BY, START WITH and ORDER BY clauses
  7980.  12,Expressions,
  7981.         -  the VALUE clause of the INSERT statement
  7982.  13,Expressions,
  7983.         -  the SET clause of the UPDATE statement
  7984.  14,Expressions,
  7985.  
  7986.  15,Expressions,
  7987.      Order of evaluation (precedence)
  7988.  16,Expressions,
  7989.            1st:  elements enclosed in parentheses
  7990.  17,Expressions,
  7991.            2nd:  exponents
  7992.  18,Expressions,
  7993.            3rd:  unary operators
  7994.  19,Expressions,
  7995.            4th:  multiplication and division
  7996.  20,Expressions,
  7997.            5th:  addition, subtraction, concatenation
  7998.  21,Expressions,
  7999.  
  8000.  22,Expressions,
  8001.  See also: expression forms, literals, variables, select list, where,
  8002.  23,Expressions,
  8003.            conditions, connect by, order by, insert, update, menu.
  8004.   1,FETCH,
  8005.  
  8006.   2,FETCH,
  8007.  
  8008.   3,FETCH,
  8009.                                FETCH
  8010.   4,FETCH,
  8011.                                                      PL/SQL statement
  8012.   5,FETCH,
  8013.  
  8014.   6,FETCH,
  8015.  FETCH cursor_name INTO variable_name1, variable_name2,...;
  8016.   7,FETCH,
  8017.  FETCH cursor_name INTO record_name;
  8018.   8,FETCH,
  8019.  
  8020.   9,FETCH,
  8021.  FETCH retrieves the next row of data from an explicitly declared and
  8022.  10,FETCH,
  8023.  currently open cursor set, and places the data:
  8024.  11,FETCH,
  8025.  
  8026.  12,FETCH,
  8027.   - INTO variable_name: a list of scalar variables.  For every column
  8028.  13,FETCH,
  8029.     returned by the cursor-associated query, there must be a variable
  8030.  14,FETCH,
  8031.     of the same datatype as the column, or automatically convertible.
  8032.  15,FETCH,
  8033.  
  8034.  16,FETCH,
  8035.   - INTO record_name: a record variable declared using %ROWTYPE.
  8036.  17,FETCH,
  8037.  
  8038.  18,FETCH,
  8039.  Use a cursor FOR loop to retrieve data from multiple rows; you don't
  8040.  19,FETCH,
  8041.  need to OPEN, FETCH, and CLOSE the cursor for each row.
  8042.  20,FETCH,
  8043.  
  8044.  21,FETCH,
  8045.  
  8046.  22,FETCH,
  8047.  See also: example cursors, cursors, implicit conversions, attributes,
  8048.  23,FETCH,
  8049.            cursor for, menu.
  8050.   1,FOR UPDATE OF,
  8051.  
  8052.   2,FOR UPDATE OF,
  8053.  
  8054.   3,FOR UPDATE OF,
  8055.                            FOR UPDATE OF
  8056.   4,FOR UPDATE OF,
  8057.                                                          SQL clauses
  8058.   5,FOR UPDATE OF,
  8059.  SELECT list  FROM...
  8060.   6,FOR UPDATE OF,
  8061.     FOR UPDATE OF column, column,...        --one column is required
  8062.   7,FOR UPDATE OF,
  8063.     NOWAIT;
  8064.   8,FOR UPDATE OF,
  8065.  
  8066.   9,FOR UPDATE OF,
  8067.  
  8068.  10,FOR UPDATE OF,
  8069.  FOR UPDATE OF locks the selected rows of a table before one or more
  8070.  11,FOR UPDATE OF,
  8071.  UPDATE...WHERE statements.  Other users cannot lock or update those
  8072.  12,FOR UPDATE OF,
  8073.  rows until they are freed by a COMMIT or ROLLBACK. You can also use
  8074.  13,FOR UPDATE OF,
  8075.  FOR UPDATE OF with INSERT and DELETE.
  8076.  14,FOR UPDATE OF,
  8077.  
  8078.  15,FOR UPDATE OF,
  8079.  You cannot use FOR UPDATE OF with set functions, nor with DISTINCT,
  8080.  16,FOR UPDATE OF,
  8081.  GROUP BY, UNION, INTERSECT or MINUS clauses.
  8082.  17,FOR UPDATE OF,
  8083.  
  8084.  18,FOR UPDATE OF,
  8085.  NOWAIT leaves the statement instead of waiting if any row cannot be
  8086.  19,FOR UPDATE OF,
  8087.  locked because someone else is using it.
  8088.  20,FOR UPDATE OF,
  8089.  
  8090.  21,FOR UPDATE OF,
  8091.  
  8092.  22,FOR UPDATE OF,
  8093.  See also: example delete, select, update, commit, rollback, insert,
  8094.  23,FOR UPDATE OF,
  8095.            delete, commands, menu.
  8096.   1,FROM,
  8097.  
  8098.   2,FROM,
  8099.  
  8100.   3,FROM,
  8101.                                 FROM
  8102.   4,FROM,
  8103.                                                          SQL clause
  8104.   5,FROM,
  8105.  SELECT list
  8106.   6,FROM,
  8107.     FROM table WHERE...                      --SELECT requires FROM
  8108.   7,FROM,
  8109.     ...
  8110.   8,FROM,
  8111.  
  8112.   9,FROM,
  8113.  DELETE FROM table WHERE...                  --FROM, WHERE optional
  8114.  10,FROM,
  8115.     ...
  8116.  11,FROM,
  8117.  
  8118.  12,FROM,
  8119.     FROM user.table alias @databaselink,...  --option within SELECT
  8120.  13,FROM,
  8121.     ...                                        and DELETE
  8122.  14,FROM,
  8123.  
  8124.  15,FROM,
  8125.  The FROM clause identifies one or more tables from which to SELECT
  8126.  16,FROM,
  8127.  rows, or the table from which to DELETE rows.  If the table is not
  8128.  17,FROM,
  8129.  yours, you must specify the user (owner).  @databaselink refers to
  8130.  18,FROM,
  8131.  a valid remote database.
  8132.  19,FROM,
  8133.  
  8134.  20,FROM,
  8135.  
  8136.  21,FROM,
  8137.  See also: example query, select list, delete, user id, alias, links,
  8138.  22,FROM,
  8139.            remote databases, select, menu.
  8140.   1,Files,
  8141.  
  8142.   2,Files,
  8143.  
  8144.   3,Files,
  8145.                                  Files
  8146.   4,Files,
  8147.  
  8148.   5,Files,
  8149.  Files Used by SQL*Plus
  8150.   6,Files,
  8151.  
  8152.   7,Files,
  8153.  Through SQL*Plus, you can store commands in a command file.  You can
  8154.   8,Files,
  8155.  also create output files (spool files) to save your query results.
  8156.   9,Files,
  8157.  Command files and spool files are operating system files and follow
  8158.  10,Files,
  8159.  standard naming conventions.  Edit with your system's file commands.
  8160.  11,Files,
  8161.  
  8162.  12,Files,
  8163.  
  8164.  13,Files,
  8165.  Command Entry and Execution
  8166.  14,Files,
  8167.  
  8168.  15,Files,
  8169.      Enter SQL, PL/SQL, and SQL*Plus commands at the command prompt: SQL>
  8170.  16,Files,
  8171.      SQL*Plus stores the SQL commands and PL/SQL blocks you enter in the
  8172.  17,Files,
  8173.      default buffer (the SQL buffer).  You can define other buffers, but
  8174.  18,Files,
  8175.      SQL*Plus does not require them.
  8176.  19,Files,
  8177.  
  8178.  20,Files,
  8179.  
  8180.  21,Files,
  8181.  See also: buffer, commands, menu.
  8182.   1,Format Dates,
  8183.  
  8184.   2,Format Dates,
  8185.  
  8186.   3,Format Dates,
  8187.                        Format Dates
  8188.   4,Format Dates,
  8189.  
  8190.   5,Format Dates,
  8191.    Element         Meaning in TO_CHAR       Element   Meaning in TO_CHAR
  8192.   6,Format Dates,
  8193.  ----------------------------------------------------------------------------
  8194.   7,Format Dates,
  8195.    CC or SCC       Century or -BC century     Q       Quarter (1-4)
  8196.   8,Format Dates,
  8197.    YYYY or SYYYY   Year or -year BC           MM      Month (01-12)
  8198.   9,Format Dates,
  8199.    YYY or YY or Y  Last 3,2,1 yr digits       MONTH   Month name (pad to 9)
  8200.  10,Format Dates,
  8201.    Y,YYY           Year with comma here       MON     Month in 3 chars (JAN)
  8202.  11,Format Dates,
  8203.    YEAR or SYEAR   Spelled out year           WW      Week of year (1-52)
  8204.  12,Format Dates,
  8205.    AD or BC        AD or BC indicator         W       Week of month (1-5)
  8206.  13,Format Dates,
  8207.    A.D. or B.C.    A.D. or B.C.               DDD     Day of year (1-366)
  8208.  14,Format Dates,
  8209.    AM or PM        Meridian indicator         DD      Day of month (1-31)
  8210.  15,Format Dates,
  8211.    A.M. or P.M.    With periods               D       Day of week (1-7)
  8212.  16,Format Dates,
  8213.    HH or HH12      Hour of day (1-12)         DAY     Day name (pad to 9)
  8214.  17,Format Dates,
  8215.    HH24            Hour of day (0-23)         DY      Day in 3 chars (WED)
  8216.  18,Format Dates,
  8217.    MI              Minute (00-59)             J       Julian: number of days
  8218.  19,Format Dates,
  8219.    SS              Second (00-59)                     since Jan 1, 4712 B.C.
  8220.  20,Format Dates,
  8221.    SSSSS           Seconds past midnight (0-86399)
  8222.  21,Format Dates,
  8223.  
  8224.  22,Format Dates,
  8225.  
  8226.  23,Format Dates,
  8227.  See also: format modifiers, conversion (functions), format numbers, menu.
  8228.   1,Format Modifiers,
  8229.  
  8230.   2,Format Modifiers,
  8231.  
  8232.   3,Format Modifiers,
  8233.                          Format Modifiers
  8234.   4,Format Modifiers,
  8235.  
  8236.   5,Format Modifiers,
  8237.  Case modifiers in SQL:  MON = APRIL     Mon = April     mon = april
  8238.   6,Format Modifiers,
  8239.                          DAY = FRIDAY    Day = Friday    day = friday
  8240.   7,Format Modifiers,
  8241.  
  8242.   8,Format Modifiers,
  8243.    Element       Meaning
  8244.   9,Format Modifiers,
  8245.  -------------------------------------------------------------------------
  8246.  10,Format Modifiers,
  8247.    fm            Prefix that suppresses blank padding of MONTH, etc.,
  8248.  11,Format Modifiers,
  8249.                  leaving a variable-length result; mode persists in
  8250.  12,Format Modifiers,
  8251.                  the format until the next fm restores blank padding.
  8252.  13,Format Modifiers,
  8253.  
  8254.  14,Format Modifiers,
  8255.    TH            Produces ordinal number (DDth for 5th)
  8256.  15,Format Modifiers,
  8257.  
  8258.  16,Format Modifiers,
  8259.    SP            Spells out a number (ddSP for five)
  8260.  17,Format Modifiers,
  8261.  
  8262.  18,Format Modifiers,
  8263.    THSP, SPTH    Spells out an ordinal number (DdthSP for Fifth)
  8264.  19,Format Modifiers,
  8265.  
  8266.  20,Format Modifiers,
  8267.    'string'      Show string in result
  8268.  21,Format Modifiers,
  8269.  
  8270.  22,Format Modifiers,
  8271.  
  8272.  23,Format Modifiers,
  8273.  See also: format dates, date functions, date (datatype), menu.
  8274.   1,Format Numbers,
  8275.  
  8276.   2,Format Numbers,
  8277.  
  8278.   3,Format Numbers,
  8279.                         Format Numbers
  8280.   4,Format Numbers,
  8281.  
  8282.   5,Format Numbers,
  8283.  Use these SQL format elements in TO_CHAR datatype conversion parameters:
  8284.   6,Format Numbers,
  8285.  
  8286.   7,Format Numbers,
  8287.  Element     Example    Action
  8288.   8,Format Numbers,
  8289.  ------------------------------------------------------------------------
  8290.   9,Format Numbers,
  8291.  9        99999      The number of 9s sets the display width.
  8292.  10,Format Numbers,
  8293.  0        099        Displays number with leading zeros.
  8294.  11,Format Numbers,
  8295.  $        $999       Displays dollar sign in front of number.
  8296.  12,Format Numbers,
  8297.  B        B99        Displays zeros as blank, not 0.
  8298.  13,Format Numbers,
  8299.  MI       999MI      Displays a minus sign after a negative number.
  8300.  14,Format Numbers,
  8301.  PR       999PR      Displays a negative number in <angle brackets>.
  8302.  15,Format Numbers,
  8303.  ,        9,999      Displays a comma in the position indicated.
  8304.  16,Format Numbers,
  8305.  .        9.999      Displays a period in the position indicated.
  8306.  17,Format Numbers,
  8307.  V        99V99      Multiplies value by 10 times no. of 9s after V.
  8308.  18,Format Numbers,
  8309.  E        9.99EEEE   Displays number in scientific notation.
  8310.  19,Format Numbers,
  8311.  DATE     DATE       Stores date in number value in MM/DD/YY format.
  8312.  20,Format Numbers,
  8313.  
  8314.  21,Format Numbers,
  8315.  
  8316.  22,Format Numbers,
  8317.  
  8318.  23,Format Numbers,
  8319.  See also: conversion (functions), format dates, menu.
  8320.   1,GET,
  8321.  
  8322.   2,GET,
  8323.  
  8324.   3,GET,
  8325.                                     GET
  8326.   4,GET,
  8327.  
  8328.   5,GET,
  8329.  GET file_name[.ext ] [ LIS[T] | NOL[IST] ]
  8330.   6,GET,
  8331.  
  8332.   7,GET,
  8333.  GET loads a host operating system file into the buffer.
  8334.   8,GET,
  8335.  
  8336.   9,GET,
  8337.      file_name[.ext ]
  8338.  10,GET,
  8339.          is the file to load (typically a command file).  If you omit .ext,
  8340.  11,GET,
  8341.          SQL*Plus uses the default command-file extension (normally SQL).
  8342.  12,GET,
  8343.          For information on changing the default extension, see the SET
  8344.  13,GET,
  8345.          command's SUFFIX clause.
  8346.  14,GET,
  8347.  
  8348.  15,GET,
  8349.      LIS[T]
  8350.  16,GET,
  8351.          lists the contents of the file.   This is the default.
  8352.  17,GET,
  8353.  
  8354.  18,GET,
  8355.      NOL[IST]
  8356.  19,GET,
  8357.          suppresses the listing of the file's contents.
  8358.  20,GET,
  8359.  
  8360.  21,GET,
  8361.  
  8362.  22,GET,
  8363.  Example:  To load a file called YEARENDRPT with the extension SQL into
  8364.  23,GET,
  8365.            the buffer, type:
  8366.  24,GET,
  8367.  
  8368.  25,GET,
  8369.                SQL> GET YEARENDRPT
  8370.  26,GET,
  8371.  
  8372.  27,GET,
  8373.  
  8374.  28,GET,
  8375.  See also: @, /, accept, input, list, run, save, set (buffer), spool,
  8376.  29,GET,
  8377.            commands, menu.
  8378.   1,GOTO,
  8379.  
  8380.   2,GOTO,
  8381.  
  8382.   3,GOTO,
  8383.                                  GOTO
  8384.   4,GOTO,
  8385.  <<label_name>>                                  PL/SQL statement
  8386.   5,GOTO,
  8387.  statement...
  8388.   6,GOTO,
  8389.  ...
  8390.   7,GOTO,
  8391.  GOTO label_name;
  8392.   8,GOTO,
  8393.  
  8394.   9,GOTO,
  8395.  When executed, GOTO transfers control to the statement following
  8396.  10,GOTO,
  8397.  the <<label_name>>.
  8398.  11,GOTO,
  8399.  
  8400.  12,GOTO,
  8401.  The <<label_name>> must be in the same sequence of statements as
  8402.  13,GOTO,
  8403.  the GOTO which specifies it, or inside a sequence of statements.
  8404.  14,GOTO,
  8405.  In a LOOP or IF statement, GOTO label_3 will transfer control to
  8406.  15,GOTO,
  8407.  <<label_3>> only if <<label_3>> is in that LOOP or IF statement.
  8408.  16,GOTO,
  8409.  
  8410.  17,GOTO,
  8411.  Be sure each <<label_name>> in a block is unique.  The same name
  8412.  18,GOTO,
  8413.  declaration may appear in enclosing blocks and other blocks.
  8414.  19,GOTO,
  8415.  
  8416.  20,GOTO,
  8417.  
  8418.  21,GOTO,
  8419.  See also: example, loop, if, blocks, identifiers, commands, menu.
  8420.   1,GRANT,
  8421.  
  8422.   2,GRANT,
  8423.  
  8424.   3,GRANT,
  8425.                                   GRANT
  8426.   4,GRANT,
  8427.                                                               SQL statement
  8428.   5,GRANT,
  8429.  There are three ways to use GRANT:  1) to provide access to the database;
  8430.   6,GRANT,
  8431.  2) to provide access to tablespaces, with the option of setting a limit on
  8432.   7,GRANT,
  8433.  the amount of space available to particular users; and 3) to provide access
  8434.   8,GRANT,
  8435.  to database objects (like tables, views, and sequences).
  8436.   9,GRANT,
  8437.  
  8438.  10,GRANT,
  8439.  *First Method*
  8440.  11,GRANT,
  8441.  
  8442.  12,GRANT,
  8443.  GRANT database_privilege, database_privilege,...
  8444.  13,GRANT,
  8445.      TO username, username,...
  8446.  14,GRANT,
  8447.      IDENTIFIED BY password, password,...
  8448.  15,GRANT,
  8449.  
  8450.  16,GRANT,
  8451.  This type of GRANT provides access to the database.  Anyone may use GRANT to
  8452.  17,GRANT,
  8453.  change his or her own password; other uses of GRANT require DBA privileges.
  8454.  18,GRANT,
  8455.  
  8456.  19,GRANT,
  8457.      database_privilege
  8458.  20,GRANT,
  8459.          specifies, CONNECT, RESOURCE and/or DBA privileges.
  8460.  21,GRANT,
  8461.  
  8462.  22,GRANT,
  8463.      password
  8464.  23,GRANT,
  8465.          specifies a password for each username; it may be omitted if GRANT
  8466.  24,GRANT,
  8467.          is being used to add privileges for an existing username.  When
  8468.  25,GRANT,
  8469.          multiple usernames and passwords are specified, the first password
  8470.  26,GRANT,
  8471.          is for the first username, the second password is for the second
  8472.  27,GRANT,
  8473.          username, and so on.
  8474.  28,GRANT,
  8475.  
  8476.  29,GRANT,
  8477.  CONNECT privilege establishes a new username in the database, enabling the
  8478.  30,GRANT,
  8479.  user to connect to the database, operate on objects to which that user has
  8480.  31,GRANT,
  8481.  been given privilege, and create views, synonyms, and database links.
  8482.  32,GRANT,
  8483.  
  8484.  33,GRANT,
  8485.  RESOURCE privilege enables the user to create database objects, including
  8486.  34,GRANT,
  8487.  tables, indexes, clusters, and sequences.
  8488.  35,GRANT,
  8489.  
  8490.  36,GRANT,
  8491.  DBA privileges enable the user to bypass many privileges normally required
  8492.  37,GRANT,
  8493.  to use database objects.  DBA users may also perform administrative tasks
  8494.  38,GRANT,
  8495.  like CREATE TABLESPACE and CREATE ROLLBACK SEGMENT.
  8496.  39,GRANT,
  8497.  
  8498.  40,GRANT,
  8499.  *Second Method*
  8500.  41,GRANT,
  8501.  
  8502.  42,GRANT,
  8503.  GRANT RESOURCE quota K | M
  8504.  43,GRANT,
  8505.      ON tablespace
  8506.  44,GRANT,
  8507.      TO PUBLIC | user, user,...
  8508.  45,GRANT,
  8509.  
  8510.  46,GRANT,
  8511.  This type of GRANT provides access to tablespaces, with the option of
  8512.  47,GRANT,
  8513.  setting a limit on the amount of space available to particular users.
  8514.  48,GRANT,
  8515.  
  8516.  49,GRANT,
  8517.      RESOURCE
  8518.  50,GRANT,
  8519.          enables the users to create objects in the specified tablespace.
  8520.  51,GRANT,
  8521.  
  8522.  52,GRANT,
  8523.      quota K or M
  8524.  53,GRANT,
  8525.          is the number of tablespace bytes the user(s) may allocate.  Omit
  8526.  54,GRANT,
  8527.          quota for unlimited space.  Use 0 to revoke RESOURCE privilege on
  8528.  55,GRANT,
  8529.          the tablespace.  K = quota x 1024.  M = quota x 1,048,576.
  8530.  56,GRANT,
  8531.  
  8532.  57,GRANT,
  8533.      TO PUBLIC or user, user,...
  8534.  58,GRANT,
  8535.          grants the resource to all database users, or to those listed.
  8536.  59,GRANT,
  8537.  
  8538.  60,GRANT,
  8539.  *Third Method*
  8540.  61,GRANT,
  8541.  
  8542.  62,GRANT,
  8543.  GRANT object_privilege, object_privilege,... | ALL
  8544.  63,GRANT,
  8545.      ON user.object
  8546.  64,GRANT,
  8547.      TO PUBLIC | user, user,...
  8548.  65,GRANT,
  8549.      WITH GRANT OPTION
  8550.  66,GRANT,
  8551.  
  8552.  67,GRANT,
  8553.  This type of GRANT provides access to database objects like tables, views,
  8554.  68,GRANT,
  8555.  and sequences.  You must own the object, have GRANT OPTION on it, or have
  8556.  69,GRANT,
  8557.  DBA privileges.
  8558.  70,GRANT,
  8559.  
  8560.  71,GRANT,
  8561.      object_privilege, object_privilege,...
  8562.  72,GRANT,
  8563.          for tables, either:    ALTER, DELETE, INDEX, INSERT, REFERENCES,
  8564.  73,GRANT,
  8565.                                     SELECT, or UPDATE
  8566.  74,GRANT,
  8567.          for views, either:     DELETE, INSERT, SELECT, or UPDATE
  8568.  75,GRANT,
  8569.          for sequences, either: ALTER or SELECT
  8570.  76,GRANT,
  8571.  
  8572.  77,GRANT,
  8573.          The UPDATE privilege can restrict updates to specific columns;
  8574.  78,GRANT,
  8575.          the syntax is:  GRANT UPDATE column, column,...
  8576.  79,GRANT,
  8577.  
  8578.  80,GRANT,
  8579.      ALL PRIVILEGES
  8580.  81,GRANT,
  8581.          grants all privileges possible on the specified object.
  8582.  82,GRANT,
  8583.  
  8584.  83,GRANT,
  8585.      WITH GRANT OPTION
  8586.  84,GRANT,
  8587.          enables the grantee to grant his/her privileges to another user.
  8588.  85,GRANT,
  8589.  
  8590.  86,GRANT,
  8591.  See also: alter user, revoke, create sequence, dba, commands, menu.
  8592.   1,GROUP BY,
  8593.  
  8594.   2,GROUP BY,
  8595.  
  8596.   3,GROUP BY,
  8597.                            GROUP BY (and HAVING)
  8598.   4,GROUP BY,
  8599.                                                          SQL clauses
  8600.   5,GROUP BY,
  8601.  
  8602.   6,GROUP BY,
  8603.  SELECT list...                            --only one expr required
  8604.   7,GROUP BY,
  8605.    FROM table, table...                    --only one table required
  8606.   8,GROUP BY,
  8607.    WHERE condition                         --not required
  8608.   9,GROUP BY,
  8609.    GROUP BY expr, expr,...                 --only one expr required
  8610.  10,GROUP BY,
  8611.    HAVING condition                        --not required
  8612.  11,GROUP BY,
  8613.  
  8614.  12,GROUP BY,
  8615.  With the GROUP BY clause, SELECT computes one summary row for each
  8616.  13,GROUP BY,
  8617.  group of selected rows.  Every SELECT list expression must either:
  8618.  14,GROUP BY,
  8619.  
  8620.  15,GROUP BY,
  8621.      - be a function or constant with no parameter, like SYSDATE;
  8622.  16,GROUP BY,
  8623.      - contain a group function like SUM, COUNT, or MAX;
  8624.  17,GROUP BY,
  8625.      - match a GROUP BY expr.
  8626.  18,GROUP BY,
  8627.  
  8628.  19,GROUP BY,
  8629.  The HAVING condition sets which GROUP BY groups appear in the result.
  8630.  20,GROUP BY,
  8631.  
  8632.  21,GROUP BY,
  8633.  
  8634.  22,GROUP BY,
  8635.  See also: example group by, select list, expressions, conditions,
  8636.  23,GROUP BY,
  8637.            group functions, select, commands, menu.
  8638.   1,Group Functions,
  8639.  
  8640.   2,Group Functions,
  8641.  
  8642.   3,Group Functions,
  8643.                            Group Functions
  8644.   4,Group Functions,
  8645.  
  8646.   5,Group Functions,
  8647.  SQL group functions return results based on groups of rows.  You can
  8648.   6,Group Functions,
  8649.  use them only in SQL queries and subqueries. 
  8650.   7,Group Functions,
  8651.  
  8652.   8,Group Functions,
  8653.  AVG(D|A expr)        Gives average of expr values across rows.
  8654.   9,Group Functions,
  8655.  
  8656.  10,Group Functions,
  8657.  COUNT(D|A expr)      Gives number of rows where expr is not null.
  8658.  11,Group Functions,
  8659.  COUNT(*)             Gives total number of rows, including nulls.
  8660.  12,Group Functions,
  8661.  
  8662.  13,Group Functions,
  8663.  MAX(D|A expr)        Gives maximum expr value across rows.
  8664.  14,Group Functions,
  8665.  MIN(D|A expr)        Gives minimum expr value across rows.
  8666.  15,Group Functions,
  8667.  
  8668.  16,Group Functions,
  8669.  STDDEV(D|A expr)     Gives standard deviation of expr values in rows.
  8670.  17,Group Functions,
  8671.  SUM(D|A expr)        Gives the sum of expr values across rows.
  8672.  18,Group Functions,
  8673.  VARIANCE(D|A expr)   Gives variance of expr values across rows.
  8674.  19,Group Functions,
  8675.  
  8676.  20,Group Functions,
  8677.  D|A = DISTINCT values or ALL (default=ALL).  Null values are ignored
  8678.  21,Group Functions,
  8679.  except in COUNT(*).
  8680.  22,Group Functions,
  8681.  
  8682.  23,Group Functions,
  8683.  See also: example group functions, query, 1 row char, 1 row number,
  8684.  24,Group Functions,
  8685.            conversion, date functions, error reporting, other functions,
  8686.  25,Group Functions,
  8687.            examples, commands, menu.
  8688.   1,HAVING,
  8689.  
  8690.   2,HAVING,
  8691.  
  8692.   3,HAVING,
  8693.                           HAVING (and GROUP BY)
  8694.   4,HAVING,
  8695.                                                           SQL clauses
  8696.   5,HAVING,
  8697.  
  8698.   6,HAVING,
  8699.  SELECT list...                            --only one expr required
  8700.   7,HAVING,
  8701.    FROM table, table...                    --only one table required
  8702.   8,HAVING,
  8703.    WHERE condition                         --not required
  8704.   9,HAVING,
  8705.    GROUP BY expr, expr,...                 --only one expr required
  8706.  10,HAVING,
  8707.    HAVING condition                        --not required
  8708.  11,HAVING,
  8709.  
  8710.  12,HAVING,
  8711.  The HAVING condition sets which GROUP BY groups appear in the result.
  8712.  13,HAVING,
  8713.  
  8714.  14,HAVING,
  8715.  With the GROUP BY clause, SELECT computes one summary row for each
  8716.  15,HAVING,
  8717.  group of selected rows.  Every SELECT list expression must either:
  8718.  16,HAVING,
  8719.  
  8720.  17,HAVING,
  8721.      - be a function or constant with no parameter, like SYSDATE;
  8722.  18,HAVING,
  8723.      - contain a group function like SUM, COUNT, or MAX;
  8724.  19,HAVING,
  8725.      - match a GROUP BY expr.
  8726.  20,HAVING,
  8727.  
  8728.  21,HAVING,
  8729.  
  8730.  22,HAVING,
  8731.  See also: example group by, select list, expressions, conditions,
  8732.  23,HAVING,
  8733.            group functions, select, commands, menu.
  8734.   1,HELP,
  8735.  
  8736.   2,HELP,
  8737.  
  8738.   3,HELP,
  8739.                                     HELP
  8740.   4,HELP,
  8741.  
  8742.   5,HELP,
  8743.  HELP [topic] | help
  8744.   6,HELP,
  8745.  
  8746.   7,HELP,
  8747.  HELP displays information on the commands and conventions of SQL*Plus,
  8748.   8,HELP,
  8749.  SQL, and PL/SQL.  Type help, a space, all or part of any topic, and
  8750.   9,HELP,
  8751.  then press Enter.
  8752.  10,HELP,
  8753.  
  8754.  11,HELP,
  8755.  Typing only part of a topic will cause all help topics that match the
  8756.  12,HELP,
  8757.  partial topic to be displayed on your screen in alphabetical order.
  8758.  13,HELP,
  8759.  For example, HELP SE will retrieve help on the SELECT statement, the 
  8760.  14,HELP,
  8761.  SET command, and the Set Operators--in that order.
  8762.  15,HELP,
  8763.  
  8764.  16,HELP,
  8765.      ENTER THIS...     TO DISPLAY THIS...
  8766.  17,HELP,
  8767.      --------------------------------------------------------------
  8768.  18,HELP,
  8769.      help menu         the main menu of help topics
  8770.  19,HELP,
  8771.      help commands     a list of SQL*Plus, SQL, and PL/SQL commands
  8772.  20,HELP,
  8773.      help comm         information on commands, comments, and commit
  8774.  21,HELP,
  8775.      help help         this screen
  8776.  22,HELP,
  8777.      help examples     the menu of examples
  8778.  23,HELP,
  8779.  
  8780.  24,HELP,
  8781.  
  8782.   1,HOST,
  8783.  
  8784.   2,HOST,
  8785.  
  8786.   3,HOST,
  8787.                                     HOST
  8788.   4,HOST,
  8789.  
  8790.   5,HOST,
  8791.  HO[ST] [ command ]
  8792.   6,HOST,
  8793.  
  8794.   7,HOST,
  8795.  HOST executes a host operating system command without leaving SQL*Plus.
  8796.   8,HOST,
  8797.  
  8798.   9,HOST,
  8799.      command
  8800.  10,HOST,
  8801.          is a host operating system command.  Enter HOST without command to
  8802.  11,HOST,
  8803.          display an operating system prompt.  You can then enter multiple
  8804.  12,HOST,
  8805.          operating system commands.  To return to SQL*Plus, type LOGOFF,
  8806.  13,HOST,
  8807.          EXIT, QUIT, or other command applicable to your operating system.
  8808.  14,HOST,
  8809.  
  8810.  15,HOST,
  8811.  With some operating systems, you can use $ or another character instead
  8812.  16,HOST,
  8813.  of HOST.  You may or may not have access to the HOST command, depending
  8814.  17,HOST,
  8815.  on your operating system, and privileges assigned by your system
  8816.  18,HOST,
  8817.  administrator.
  8818.  19,HOST,
  8819.  
  8820.  20,HOST,
  8821.  
  8822.  21,HOST,
  8823.  Example:  To execute an operating system command, ls *.sql, enter:
  8824.  22,HOST,
  8825.  
  8826.  23,HOST,
  8827.                SQL> HOST ls *.sql
  8828.  24,HOST,
  8829.  
  8830.  25,HOST,
  8831.  
  8832.  26,HOST,
  8833.  See also: change, del, edit, exit, commands, menu.
  8834.   1,IF,
  8835.  
  8836.   2,IF,
  8837.  
  8838.   3,IF,
  8839.                                   IF
  8840.   4,IF,
  8841.                                                     PL/SQL statement
  8842.   5,IF,
  8843.  When IF evaluates condition_1 as TRUE its series_of_statements is
  8844.   6,IF,
  8845.  executed.  When FALSE, it passes control to ELSIF which evaluates
  8846.   7,IF,
  8847.  condition_2 similarly, and so on until ELSE, whose statements are
  8848.   8,IF,
  8849.  executed only when no conditions of IF and ELSEIF evaluate to TRUE.
  8850.   9,IF,
  8851.  
  8852.  10,IF,
  8853.               IF condition_1 THEN
  8854.  11,IF,
  8855.                  series_of_statements;
  8856.  12,IF,
  8857.    
  8858.  13,IF,
  8859.                  ELSIF condition_2 THEN
  8860.  14,IF,
  8861.                     series_of_statements;
  8862.  15,IF,
  8863.  
  8864.  16,IF,
  8865.                  ELSIF condition_3 THEN
  8866.  17,IF,
  8867.                     series_of_statements;...
  8868.  18,IF,
  8869.  
  8870.  19,IF,
  8871.                  ELSE series_of_statements;
  8872.  20,IF,
  8873.  
  8874.  21,IF,
  8875.               ENDIF;
  8876.  22,IF,
  8877.  
  8878.  23,IF,
  8879.  See also: example numeric for, conditions, boolean comparisons, end,
  8880.  24,IF,
  8881.            nulls, commands, menu.
  8882.   1,INPUT,
  8883.  
  8884.   2,INPUT,
  8885.  
  8886.   3,INPUT,
  8887.                                   INPUT
  8888.   4,INPUT,
  8889.  
  8890.   5,INPUT,
  8891.  I[NPUT] [ text ]
  8892.   6,INPUT,
  8893.  
  8894.   7,INPUT,
  8895.  INPUT adds one or more lines of text after the current line in the buffer.
  8896.   8,INPUT,
  8897.  
  8898.   9,INPUT,
  8899.      text
  8900.  10,INPUT,
  8901.          is the text to add.  To add one line, enter INPUT, a space, and
  8902.  11,INPUT,
  8903.          the text. (To begin the line with one or more spaces, enter two
  8904.  12,INPUT,
  8905.          or more spaces after INPUT.)  To add several lines, enter INPUT
  8906.  13,INPUT,
  8907.          without text; INPUT prompts you for each line.  To leave INPUT,
  8908.  14,INPUT,
  8909.          enter an empty line.
  8910.  15,INPUT,
  8911.  
  8912.  16,INPUT,
  8913.  At the command prompt, if you enter a line number larger than the number
  8914.  17,INPUT,
  8915.  of lines in the buffer, and follow the number with text, SQL*Plus adds
  8916.  18,INPUT,
  8917.  the text in a new line at the end of the buffer.  If you specify zero (0)
  8918.  19,INPUT,
  8919.  for the line number and follow the zero with text, SQL*Plus inserts the
  8920.  20,INPUT,
  8921.  line at the beginning of the buffer; that line becomes line 1.
  8922.  21,INPUT,
  8923.  
  8924.  22,INPUT,
  8925.  Examples: The SQL buffer contains the following command:
  8926.  23,INPUT,
  8927.  
  8928.  24,INPUT,
  8929.                1  SELECT ENAME, DEPTNO, SAL, COMM
  8930.  25,INPUT,
  8931.                2  FROM EMP
  8932.  26,INPUT,
  8933.  
  8934.  27,INPUT,
  8935.            To add an ORDER BY clause to the query, enter:
  8936.  28,INPUT,
  8937.  
  8938.  29,INPUT,
  8939.                SQL> LIST 2
  8940.  30,INPUT,
  8941.                  2* FROM EMP
  8942.  31,INPUT,
  8943.  
  8944.  32,INPUT,
  8945.                SQL> INPUT ORDER BY ENAME
  8946.  33,INPUT,
  8947.  
  8948.  34,INPUT,
  8949.            LIST 2 ensures that line 2 is the current line.  INPUT adds a
  8950.  35,INPUT,
  8951.            line with the ORDER BY clause after the current line. The SQL
  8952.  36,INPUT,
  8953.            buffer now contains:
  8954.  37,INPUT,
  8955.  
  8956.  38,INPUT,
  8957.                1  SELECT ENAME, DEPTNO, SAL, COMM
  8958.  39,INPUT,
  8959.                2  FROM EMP
  8960.  40,INPUT,
  8961.                3* ORDER BY ENAME
  8962.  41,INPUT,
  8963.  
  8964.  42,INPUT,
  8965.            To add a two-line WHERE clause, enter:
  8966.  43,INPUT,
  8967.  
  8968.  44,INPUT,
  8969.                SQL> LIST 2
  8970.  45,INPUT,
  8971.                  2* FROM EMP
  8972.  46,INPUT,
  8973.                SQL> INPUT
  8974.  47,INPUT,
  8975.                  3  WHERE JOB = 'SALESMAN'
  8976.  48,INPUT,
  8977.                  4  AND COMM  500
  8978.  49,INPUT,
  8979.                  5
  8980.  50,INPUT,
  8981.  
  8982.  51,INPUT,
  8983.            INPUT continues to prompt you for new lines until you enter an
  8984.  52,INPUT,
  8985.            empty line.  The SQL buffer now contains the following lines:
  8986.  53,INPUT,
  8987.  
  8988.  54,INPUT,
  8989.                1  SELECT ENAME, DEPTNO, SAL, COMM
  8990.  55,INPUT,
  8991.                2  FROM EMP
  8992.  56,INPUT,
  8993.                3  WHERE JOB = 'SALESMAN'
  8994.  57,INPUT,
  8995.                4  AND COMM 500
  8996.  58,INPUT,
  8997.                5  ORDER BY ENAME
  8998.  59,INPUT,
  8999.  
  9000.  60,INPUT,
  9001.  
  9002.  61,INPUT,
  9003.  See also: change, del, edit, list, save, spool, get, input,
  9004.  62,INPUT,
  9005.            set (SQL buffer), prompt, commands, menu.
  9006.   1,INSERT,
  9007.  
  9008.   2,INSERT,
  9009.  
  9010.   3,INSERT,
  9011.                                 INSERT
  9012.   4,INSERT,
  9013.                                                          SQL statement
  9014.   5,INSERT,
  9015.  
  9016.   6,INSERT,
  9017.  INSERT INTO t/v_name (column, column,...)    --(column list) optional
  9018.   7,INSERT,
  9019.     VALUES(value, value,...);
  9020.   8,INSERT,
  9021.  
  9022.   9,INSERT,
  9023.  INSERT INTO t/v_name (column, column,...) SELECT...;
  9024.  10,INSERT,
  9025.  
  9026.  11,INSERT,
  9027.  INSERT adds rows to the table or view specified.  Names in the column
  9028.  12,INSERT,
  9029.  list may be in any order.  Unlisted columns are set to NULL; you must
  9030.  13,INSERT,
  9031.  list any column created NOT NULL, and supply a value for it.
  9032.  14,INSERT,
  9033.  
  9034.  15,INSERT,
  9035.  VALUES inserts each item in its list of values into the corresponding
  9036.  16,INSERT,
  9037.  column in the list of columns. The datatypes of each pair of items in
  9038.  17,INSERT,
  9039.  the two lists must be compatible or convertible. CHAR and DATE values
  9040.  18,INSERT,
  9041.  must be enclosed in 'single quotes'.
  9042.  19,INSERT,
  9043.  
  9044.  20,INSERT,
  9045.  Use a subquery to INSERT rows from another table.  SELECT must return
  9046.  21,INSERT,
  9047.  a value for each column listed.
  9048.  22,INSERT,
  9049.  
  9050.  23,INSERT,
  9051.  See also: example insert, example cursor for, sql% cursor, nulls,
  9052.  24,INSERT,
  9053.            subquery, commands, menu.
  9054.   1,Identifiers,
  9055.  
  9056.   2,Identifiers,
  9057.  
  9058.   3,Identifiers,
  9059.                            Identifiers
  9060.   4,Identifiers,
  9061.  
  9062.   5,Identifiers,
  9063.  Identifiers are names of variables and constants, aliases, tables,
  9064.   6,Identifiers,
  9065.  columns, views, indexes, and other objects.  An identifier must be
  9066.   7,Identifiers,
  9067.  1-30 characters long and begin with a letter. It may have letters,
  9068.   8,Identifiers,
  9069.  numbers, and the $ _ # symbols.  It may not contain spaces or be a
  9070.   9,Identifiers,
  9071.  SQL or PL/SQL reserved word.  Case is ignored.
  9072.  10,Identifiers,
  9073.  
  9074.  11,Identifiers,
  9075.  An identifier enclosed within "quotation marks" may use a reserved
  9076.  12,Identifiers,
  9077.  word or contain any characters, including spaces. Identifiers must
  9078.  13,Identifiers,
  9079.  be separated from each other by at least 1 space or by punctuation.
  9080.  14,Identifiers,
  9081.  
  9082.  15,Identifiers,
  9083.          ALLOWED            NOT ALLOWED  and  WHY NOT
  9084.  16,Identifiers,
  9085.          -------------      ---------------------------------
  9086.  17,Identifiers,
  9087.          Balance_Due        BALANCE DUE       uses a space
  9088.  18,Identifiers,
  9089.          client_1           1st_client        begins with 1
  9090.  19,Identifiers,
  9091.          "row"              row               reserved word
  9092.  20,Identifiers,
  9093.          largest_$          $largest          begins with $
  9094.  21,Identifiers,
  9095.  
  9096.  22,Identifiers,
  9097.  
  9098.  23,Identifiers,
  9099.  See also: variables, alias, scoping rules, reserved words, menu.
  9100.   1,Implicit Conversions,
  9101.  
  9102.   2,Implicit Conversions,
  9103.  
  9104.   3,Implicit Conversions,
  9105.                          Implicit Conversions
  9106.   4,Implicit Conversions,
  9107.  
  9108.   5,Implicit Conversions,
  9109.  PL/SQL converts a variable of one datatype to an expected datatype
  9110.   6,Implicit Conversions,
  9111.  by implicitly calling a TO_NUMBER, TO_CHAR, or TO_DATE function in:
  9112.   7,Implicit Conversions,
  9113.  
  9114.   8,Implicit Conversions,
  9115.     Assignments (CHAR to NUMBER or DATE, NUMBER or DATE to CHAR)
  9116.   9,Implicit Conversions,
  9117.         variable := expression
  9118.  10,Implicit Conversions,
  9119.         INSERT INTO table VALUES...
  9120.  11,Implicit Conversions,
  9121.         UPDATE table SET column = expression...
  9122.  12,Implicit Conversions,
  9123.         SELECT expr INTO variable FROM...
  9124.  13,Implicit Conversions,
  9125.  
  9126.  14,Implicit Conversions,
  9127.     Expression Evaluation (CHAR to NUMBER, CHAR to DATE)
  9128.  15,Implicit Conversions,
  9129.         Simple expressions:  bal + '44'
  9130.  16,Implicit Conversions,
  9131.         Boolean expressions: bonus > salary / '20'
  9132.  17,Implicit Conversions,
  9133.         Function and procedure calls: MOD(counter, '3')
  9134.  18,Implicit Conversions,
  9135.         WHERE clause conditions: WHERE hiredate = '15-MAR-89'
  9136.  19,Implicit Conversions,
  9137.  
  9138.  20,Implicit Conversions,
  9139.  CHAR to DATE conversions require a string with the format DD-MON-YY.
  9140.  21,Implicit Conversions,
  9141.  
  9142.  22,Implicit Conversions,
  9143.  
  9144.  23,Implicit Conversions,
  9145.  See also: conversion (functions), expressions, where, menu.
  9146.   1,Index,
  9147.  
  9148.   2,Index,
  9149.  
  9150.   3,Index,
  9151.                                     Index
  9152.   4,Index,
  9153.  
  9154.   5,Index,
  9155.  Enter help, a space, and then part or all of the help topic you want:
  9156.   6,Index,
  9157.  
  9158.   7,Index,
  9159.  ACCEPT                    Boolean Comparisons     Constraints (clauses)
  9160.   8,Index,
  9161.  Alias                     BREAK                   Conversion Functions
  9162.   9,Index,
  9163.  ALTER CLUSTER             BTITLE                  COPY
  9164.  10,Index,
  9165.  ALTER DATABASE            Buffer                  Correlated Subquery
  9166.  11,Index,
  9167.  ALTER INDEX               CHANGE                  CREATE CLUSTER
  9168.  12,Index,
  9169.  ALTER ROLLBACK (SEGMENT)  CHAR                    CREATE DATABASE
  9170.  13,Index,
  9171.  ALTER SEQUENCE            CLEAR                   CREATE DB LINK
  9172.  14,Index,
  9173.  ALTER TABLE               CLOSE                   CREATE INDEX
  9174.  15,Index,
  9175.  ALTER TABLESPACE          COLUMN                  CREATE ROLLBACK (SEGMENT)
  9176.  16,Index,
  9177.  ALTER USER                Commands                CREATE SEQUENCE
  9178.  17,Index,
  9179.  APPEND                    COMMENT                 CREATE SYNONYM
  9180.  18,Index,
  9181.  Arithmetic (& char) Oper  Comments                CREATE TABLE
  9182.  19,Index,
  9183.  Attributes                COMMIT                  CREATE TABLESPACE
  9184.  20,Index,
  9185.  AUDIT                     Comparison (operators)  CREATE VIEW
  9186.  21,Index,
  9187.  BEGIN                     COMPUTE                 CREATE Attributes
  9188.  22,Index,
  9189.  Blocks                    Conditions              Cursor FOR
  9190.  23,Index,
  9191.  BNF Syntax                CONNECT                 Cursors
  9192.  24,Index,
  9193.  BOOLEAN                   CONNECT BY
  9194.  25,Index,
  9195.  
  9196.  26,Index,
  9197.  
  9198.  27,Index,
  9199.  Data Dictionary        DROP TABLE                   Example INSERT
  9200.  28,Index,
  9201.  DATE                   DROP TABLESPACE              Example LIKE
  9202.  29,Index,
  9203.  Date Functions         DROP VIEW                    Example LOCK TABLE
  9204.  30,Index,
  9205.  DBA                    EDIT                         Example NEXTVAL
  9206.  31,Index,
  9207.  DECLARE                END                          Example Nulls
  9208.  32,Index,
  9209.  DECLARE CURSOR         Error Handling               Example Numeric FOR
  9210.  33,Index,
  9211.  DEFINE                 Error Reporting (Functions)  Example Outer Join
  9212.  34,Index,
  9213.  DEL                    Example CONNECT BY           Example Query
  9214.  35,Index,
  9215.  DELETE                 Example Conversion           Example ROLLBACK
  9216.  36,Index,
  9217.  Delimiters             Example Correlated Subquery  Example SELECT INTO
  9218.  37,Index,
  9219.  DESCRIBE               Example CURSOR FOR           Example SELECT List
  9220.  38,Index,
  9221.  DISCONNECT             Example Cursors              Example Set Operators
  9222.  39,Index,
  9223.  Distributed Query      Example Datatype             Example SET TRANSACTION
  9224.  40,Index,
  9225.  DROP CLUSTER           Example Date Functions       Example Simple Join
  9226.  41,Index,
  9227.  DROP DATABASE LINK     Example DELETE               Example Subquery
  9228.  42,Index,
  9229.  DROP INDEX             Example Error Handling       Example WHERE CURRENT OF
  9230.  43,Index,
  9231.  DROP ROLLBACK SEGMENT  Example Formats              Example WHILE
  9232.  44,Index,
  9233.  DROP SEQUENCE          Example GROUP BY             Examples
  9234.  45,Index,
  9235.  DROP SYNONYM           Example Group Functions      EXCEPTION
  9236.  46,Index,
  9237.  
  9238.  47,Index,
  9239.  
  9240.  48,Index,
  9241.  EXIT                   Identifiers             Menu
  9242.  49,Index,
  9243.  EXIT PLSQL             IF                      NEXTVAL
  9244.  50,Index,
  9245.  Expression Forms       Implicit Conversions    NOAUDIT
  9246.  51,Index,
  9247.  Expressions            Index                   NOWAIT
  9248.  52,Index,
  9249.  FETCH                  INPUT                   NULL
  9250.  53,Index,
  9251.  Files                  INSERT                  Nulls
  9252.  54,Index,
  9253.  FOR UPDATE OF          Join                    NUMBER
  9254.  55,Index,
  9255.  Format Dates           Keys                    Numeric FOR
  9256.  56,Index,
  9257.  Format Modifiers       LIKE Operator           Old (SQL*Plus Commands)
  9258.  57,Index,
  9259.  Format Numbers         Limits (SQL*Plus)       OPEN
  9260.  58,Index,
  9261.  FROM                   Links                   ORDER BY
  9262.  59,Index,
  9263.  GET                    LIST                    Other Functions
  9264.  60,Index,
  9265.  GOTO                   Literals                Other Operators
  9266.  61,Index,
  9267.  GRANT                  LOCK TABLE              Outer Join
  9268.  62,Index,
  9269.  GROUP BY (& HAVING)    Logical Operators       Overview (of SQL*Plus)
  9270.  63,Index,
  9271.  Group Functions        Long                    Parameters
  9272.  64,Index,
  9273.  HAVING (& GOUP BY)     Long raw                PAUSE
  9274.  65,Index,
  9275.  HELP                   LOOP                    PL/SQL Exceptions
  9276.  66,Index,
  9277.  HOST                   Loops                   PRAGMA EXCEPTION_INIT
  9278.  67,Index,
  9279.  
  9280.  68,Index,
  9281.  
  9282.  69,Index,
  9283.  PROMPT                 SELECT INTO             Transactions
  9284.  70,Index,
  9285.  Pseudo-Columns         SELECT List             Tree-Structured Query
  9286.  71,Index,
  9287.  Query                  Sequences               TTITLE
  9288.  72,Index,
  9289.  QUIT                   SET                     UNDEFINE
  9290.  73,Index,
  9291.  RAISE                  Set Operators           UPDATE
  9292.  74,Index,
  9293.  RAW                    SET TRANSACTION         User ID
  9294.  75,Index,
  9295.  REMARK                 SHOW                    Uses of SELECT
  9296.  76,Index,
  9297.  Remote Databases       SPOOL                   VALIDATE INDEX
  9298.  77,Index,
  9299.  RENAME                 SQL in PL/SQL           Variables (and constants)
  9300.  78,Index,
  9301.  Reserved Words         SQL% Cursor             Views (and Indexes)
  9302.  79,Index,
  9303.  REVOKE                 SQLPlus                 WHENEVER SQLERROR
  9304.  80,Index,
  9305.  ROLLBACK               START                   WHERE
  9306.  81,Index,
  9307.  RUN                    START WITH              WHERE CURRENT OF
  9308.  82,Index,
  9309.  RUNFORM                Subquery                WHILE
  9310.  83,Index,
  9311.  SAVE                   Substitution            1 Row Char (Functions)
  9312.  84,Index,
  9313.  SAVEPOINT              Synonyms                1 Row Number (Functions)
  9314.  85,Index,
  9315.  Scoping Rules          Tables (columns, rows)  / (slash)
  9316.  86,Index,
  9317.  SELECT                 TIMING                  @ ("at" sign)
  9318.  87,Index,
  9319.  
  9320.  88,Index,
  9321.  
  9322.  89,Index,
  9323.  See also: select, uses of select, examples, index, commands, menu.
  9324.   1,Join,
  9325.  
  9326.   2,Join,
  9327.                               Join
  9328.   3,Join,
  9329.  
  9330.   4,Join,
  9331.  SELECT column, table.column, ...          --table. optional
  9332.   5,Join,
  9333.    FROM table1, table2, ...
  9334.   6,Join,
  9335.    WHERE table1.column1 = table2.column1   --WHERE clause optional
  9336.   7,Join,
  9337.  
  9338.   8,Join,
  9339.  
  9340.   9,Join,
  9341.  A join combines rows from two or more tables; in the result, each
  9342.  10,Join,
  9343.  row has data from several tables.  The WHERE clause specifies how
  9344.  11,Join,
  9345.  the rows are combined.
  9346.  12,Join,
  9347.  
  9348.  13,Join,
  9349.  If you select a column that exists in more than one of the tables
  9350.  14,Join,
  9351.  in the join, prefix the column name with the table name: emp.sal.
  9352.  15,Join,
  9353.  
  9354.  16,Join,
  9355.  A simple join returns rows from two tables; the rows returned are
  9356.  17,Join,
  9357.  those with matching values in the specified column of each table.
  9358.  18,Join,
  9359.  If the WHERE clause is omitted, all rows from all tables combine;
  9360.  19,Join,
  9361.  2 tables 300 rows each returns 90,000 rows--rarely what you want.
  9362.  20,Join,
  9363.  
  9364.  21,Join,
  9365.  
  9366.  22,Join,
  9367.  See also: example simple join, select, where, uses of select, menu.
  9368.   1,Keys,
  9369.  
  9370.   2,Keys,
  9371.  
  9372.   3,Keys,
  9373.                               Keys
  9374.   4,Keys,
  9375.  
  9376.   5,Keys,
  9377.  A PRIMARY KEY is one or more columns in a table used to uniquely
  9378.   6,Keys,
  9379.  identify each row in the table.  Primary key values should never
  9380.   7,Keys,
  9381.  change, and should never be null.
  9382.   8,Keys,
  9383.  
  9384.   9,Keys,
  9385.  A FOREIGN KEY is a column with the same value as the primary key
  9386.  10,Keys,
  9387.  in another (or the same) table. A foreign key value may be null.
  9388.  11,Keys,
  9389.  For example, the DEPTNO column is the primary key of table DEPT;
  9390.  12,Keys,
  9391.  in table EMP, DEPTNO is a foreign key that references the DEPTNO
  9392.  13,Keys,
  9393.  values in table DEPT.
  9394.  14,Keys,
  9395.  
  9396.  15,Keys,
  9397.  A UNIQUE KEY is similar to a primary key, except the purpose of a
  9398.  16,Keys,
  9399.  unique key is to ensure unique information in the column for each
  9400.  17,Keys,
  9401.  record, as with telephone or driver's license numbers.  A primary
  9402.  18,Keys,
  9403.  key should only identify each row uniquely, not contain any other
  9404.  19,Keys,
  9405.  information (although it CAN). A table may have many unique keys.
  9406.  20,Keys,
  9407.  
  9408.  21,Keys,
  9409.  
  9410.  22,Keys,
  9411.  See also: tables, create table, alter table, nulls, menu.
  9412.   1,LIKE Operator,
  9413.  
  9414.   2,LIKE Operator,
  9415.  
  9416.   3,LIKE Operator,
  9417.                               LIKE Operator
  9418.   4,LIKE Operator,
  9419.  
  9420.   5,LIKE Operator,
  9421.  SELECT...
  9422.   6,LIKE Operator,
  9423.     WHERE char LIKE 'pattern'
  9424.   7,LIKE Operator,
  9425.     ...
  9426.   8,LIKE Operator,
  9427.  
  9428.   9,LIKE Operator,
  9429.  The SQL LIKE operator matches part of the char string to part of the
  9430.  10,LIKE Operator,
  9431.  'pattern' string. You can use two "wild card" matching characters in
  9432.  11,LIKE Operator,
  9433.  the 'pattern':    % (percent sign)  matches zero or more characters;
  9434.  12,LIKE Operator,
  9435.                    _ (underscore)    matches exactly one character.
  9436.  13,LIKE Operator,
  9437.  
  9438.  14,LIKE Operator,
  9439.  
  9440.  15,LIKE Operator,
  9441.  String literals must be within 'apostrophes'.  Case is significant.
  9442.  16,LIKE Operator,
  9443.  
  9444.  17,LIKE Operator,
  9445.  This expression...     will select these values...   but not these...
  9446.  18,LIKE Operator,
  9447.  ---------------------------------------------------------------------
  9448.  19,LIKE Operator,
  9449.  lname LIKE 'S_ile%'    Smile, Stiles, Skilerson      smile, Samiler
  9450.  20,LIKE Operator,
  9451.  title LIKE '%ager'     Manager, dowager,  pager      MANAGER, agent
  9452.  21,LIKE Operator,
  9453.  
  9454.  22,LIKE Operator,
  9455.  
  9456.  23,LIKE Operator,
  9457.  See also: example like, comparison (operators), expression, menu.
  9458.   1,LIST,
  9459.  
  9460.   2,LIST,
  9461.  
  9462.   3,LIST,
  9463.                                     LIST
  9464.   4,LIST,
  9465.  
  9466.   5,LIST,
  9467.  L[IST] [ n | n m | n  * | n LAST | * | * n | * LAST | LAST]
  9468.   6,LIST,
  9469.  
  9470.   7,LIST,
  9471.  
  9472.   8,LIST,
  9473.  LIST displays one or more lines of the buffer. Enter LIST by itself to
  9474.   9,LIST,
  9475.  list all lines.
  9476.  10,LIST,
  9477.  
  9478.  11,LIST,
  9479.      Clause    Lists
  9480.  12,LIST,
  9481.      --------  ----------------------------------------
  9482.  13,LIST,
  9483.      n         line n.
  9484.  14,LIST,
  9485.      n m       lines n through m.
  9486.  15,LIST,
  9487.      n *       line n through the current line.
  9488.  16,LIST,
  9489.      n LAST    line n through the last line.
  9490.  17,LIST,
  9491.      *         the current line.
  9492.  18,LIST,
  9493.      * n       the current line through line n.
  9494.  19,LIST,
  9495.      * LAST    the current line through the last line.
  9496.  20,LIST,
  9497.      LAST      the last line.
  9498.  21,LIST,
  9499.  
  9500.  22,LIST,
  9501.  
  9502.  23,LIST,
  9503.  You can omit the space between LIST and n or *, but not between LIST and
  9504.  24,LIST,
  9505.  LAST.  The last line listed is the new current line (with an asterisk).
  9506.  25,LIST,
  9507.  
  9508.  26,LIST,
  9509.  
  9510.  27,LIST,
  9511.  Example:  To list the contents of the buffer, enter:
  9512.  28,LIST,
  9513.  
  9514.  29,LIST,
  9515.                SQL> L
  9516.  30,LIST,
  9517.  
  9518.  31,LIST,
  9519.            You will see a listing of all lines in the buffer, like this:
  9520.  32,LIST,
  9521.  
  9522.  33,LIST,
  9523.                  1  SELECT ENAME, DEPTNO, JOB
  9524.  34,LIST,
  9525.                  2  FROM EMP
  9526.  35,LIST,
  9527.                  3  WHERE JOB = 'CLERK'
  9528.  36,LIST,
  9529.                  4* ORDER BY DEPTNO
  9530.  37,LIST,
  9531.  
  9532.  38,LIST,
  9533.            The asterisk shows line 4 to be the current line.  To list the
  9534.  39,LIST,
  9535.            second line only, enter:
  9536.  40,LIST,
  9537.  
  9538.  41,LIST,
  9539.                SQL> L 2
  9540.  42,LIST,
  9541.                  2* FROM EMP
  9542.  43,LIST,
  9543.  
  9544.  44,LIST,
  9545.            To list the current line (now line 2) to the last line, enter:
  9546.  45,LIST,
  9547.  
  9548.  46,LIST,
  9549.                SQL> L * LAST
  9550.  47,LIST,
  9551.                  2  FROM EMP
  9552.  48,LIST,
  9553.                  3  WHERE JOB = 'CLERK'
  9554.  49,LIST,
  9555.                  4* ORDER BY DEPTNO
  9556.  50,LIST,
  9557.  
  9558.  51,LIST,
  9559.  
  9560.  52,LIST,
  9561.  See also: change, del, edit, get, input, save, spool, set (SQL buffer),
  9562.  53,LIST,
  9563.            commands, menu.
  9564.   1,LOCK TABLE,
  9565.  
  9566.   2,LOCK TABLE,
  9567.  
  9568.   3,LOCK TABLE,
  9569.                                LOCK TABLE
  9570.   4,LOCK TABLE,
  9571.                                                           SQL statement
  9572.   5,LOCK TABLE,
  9573.  
  9574.   6,LOCK TABLE,
  9575.  LOCK TABLE user.table, user.table...              --user. is optional
  9576.   7,LOCK TABLE,
  9577.    IN lockmode MODE NOWAIT;                        --NOWAIT is optional
  9578.   8,LOCK TABLE,
  9579.  
  9580.   9,LOCK TABLE,
  9581.  LOCK TABLE limits access to one or more tables, specified by lockmode:
  9582.  10,LOCK TABLE,
  9583.  
  9584.  11,LOCK TABLE,
  9585.  LOCKMODE              ALLOWS                  PROHIBITS
  9586.  12,LOCK TABLE,
  9587. -------------------------------------------------------------------------
  9588.  13,LOCK TABLE,
  9589.  SHARE                 queries, SHARE locks   updates, inserts, deletes
  9590.  14,LOCK TABLE,
  9591.  EXCLUSIVE             queries only           any other activity
  9592.  15,LOCK TABLE,
  9593.  ROW SHARE             concurrent use         entire table locks
  9594.  16,LOCK TABLE,
  9595.  ROW EXCLUSIVE         concurrent use         SHARE mode locks
  9596.  17,LOCK TABLE,
  9597.  SHARE ROW EXCLUSIVE   queries                SHARE mode locks, updates
  9598.  18,LOCK TABLE,
  9599.  
  9600.  19,LOCK TABLE,
  9601.  Once locked, a table remains locked during a DELETE, INSERT, or UPDATE
  9602.  20,LOCK TABLE,
  9603.  operation until a COMMIT or ROLLBACK of the transaction. If a table is
  9604.  21,LOCK TABLE,
  9605.  already locked, NOWAIT returns control to the user.
  9606.  22,LOCK TABLE,
  9607.  
  9608.  23,LOCK TABLE,
  9609.  See also: example lock table, query, delete, insert, update, commit,
  9610.  24,LOCK TABLE,
  9611.            nowait, rollback, savepoint, bnf syntax, commands, menu.
  9612.   1,LONG,
  9613.  
  9614.   2,LONG,
  9615.  
  9616.   3,LONG,
  9617.                               LONG
  9618.   4,LONG,
  9619.  
  9620.   5,LONG,
  9621.  LONG                   --SQL only; can't be used for PL/SQL variables
  9622.   6,LONG,
  9623.  
  9624.   7,LONG,
  9625.  Columns defined to be LONG store variable-length strings up to 65,535
  9626.   8,LONG,
  9627.  characters. A table may have one LONG column. Use LONG columns in the
  9628.   9,LONG,
  9629.  SELECT list and in the SET clauses of UPDATE and DELETE. Long columns
  9630.  10,LONG,
  9631.  cannot be indexed or referenced by functions.  They cannot be used:
  9632.  11,LONG,
  9633.        -  in expressions
  9634.  12,LONG,
  9635.        -  in the SELECT list of a nested query, nor in a distributed
  9636.  13,LONG,
  9637.               query
  9638.  14,LONG,
  9639.        -  in a query connected by UNION, INTERSECT or MINUS clauses
  9640.  15,LONG,
  9641.        -  with with WHERE, GROUP BY, ORDER BY, CONNECT BY, or DISTINCT
  9642.  16,LONG,
  9643.  
  9644.  17,LONG,
  9645.  
  9646.  18,LONG,
  9647.  See also: conversion, variables, number, char, long raw, date, boolean,
  9648.  19,LONG,
  9649.            raw, menu.
  9650.   1,LONG RAW,
  9651.  
  9652.   2,LONG RAW,
  9653.  
  9654.   3,LONG RAW,
  9655.                              LONG RAW
  9656.   4,LONG RAW,
  9657.  
  9658.   5,LONG RAW,
  9659.  LONG RAW
  9660.   6,LONG RAW,
  9661.  
  9662.   7,LONG RAW,
  9663.  Use the LONG RAW datatype in SQL to store byte-oriented data:
  9664.   8,LONG RAW,
  9665.  character strings, and graphics character sequences. ORACLE
  9666.   9,LONG RAW,
  9667.  displays RAW data as hexidecimal character values.
  9668.  10,LONG RAW,
  9669.  
  9670.  11,LONG RAW,
  9671.  
  9672.  12,LONG RAW,
  9673.  The LONG RAW datatype is the same as LONG, except over SQL*Net,
  9674.  13,LONG RAW,
  9675.  at which time SQL*Net will convert between ASCII and EBCIDIC
  9676.  14,LONG RAW,
  9677.  character set representations for CHAR data.
  9678.  15,LONG RAW,
  9679.  
  9680.  16,LONG RAW,
  9681.  
  9682.  17,LONG RAW,
  9683.  See also: connect, char, date, number, long, boolean, raw, menu.
  9684.   1,LOOP,
  9685.  
  9686.   2,LOOP,
  9687.  
  9688.   3,LOOP,
  9689.                             LOOP
  9690.   4,LOOP,
  9691.                                                       PL/SQL statement
  9692.   5,LOOP,
  9693.  <<label_name>>                  --<<label_name>> optional on any loop
  9694.   6,LOOP,
  9695.  LOOP
  9696.   7,LOOP,
  9697.      sequence_of_statements
  9698.   8,LOOP,
  9699.  END LOOP label_name;            --If a label_name appears before LOOP,
  9700.   9,LOOP,
  9701.                                    it must be used after END LOOP.
  9702.  10,LOOP,
  9703.  
  9704.  11,LOOP,
  9705.  Basic loops are often used with the FETCH statement.  Use GOTO, RAISE,
  9706.  12,LOOP,
  9707.  or EXIT to terminate a basic loop:
  9708.  13,LOOP,
  9709.  
  9710.  14,LOOP,
  9711.          <<first>>
  9712.  15,LOOP,
  9713.          LOOP
  9714.  16,LOOP,
  9715.             FETCH cursor_name INTO record_name;
  9716.  17,LOOP,
  9717.             EXIT WHEN cursor_name %NOTFOUND;
  9718.  18,LOOP,
  9719.                data_manipulation_statements
  9720.  19,LOOP,
  9721.          END LOOP first;
  9722.  20,LOOP,
  9723.  
  9724.  21,LOOP,
  9725.  
  9726.  22,LOOP,
  9727.  Other loops: while, cursor for, numeric for.
  9728.  23,LOOP,
  9729.  See also: fetch, goto, raise, exit, end, commands, menu.
  9730.   1,Limits,
  9731.  
  9732.   2,Limits,
  9733.  
  9734.   3,Limits,
  9735.                                 Limits
  9736.   4,Limits,
  9737.  
  9738.   5,Limits,
  9739.  These limits apply to most systems, but not to PDP11 or mc68000.
  9740.   6,Limits,
  9741.  
  9742.   7,Limits,
  9743.  Item                               SQL*Plus Limit
  9744.   8,Limits,
  9745.  --------------------------------------------------------------------------
  9746.   9,Limits,
  9747.  file name length                   system-dependent
  9748.  10,Limits,
  9749.  username length                    30  characters
  9750.  11,Limits,
  9751.  user variable name length          30  characters
  9752.  12,Limits,
  9753.  user variable value length         240 characters
  9754.  13,Limits,
  9755.  number of user variables           1,024
  9756.  14,Limits,
  9757.  variables in INSERT INTO list      50
  9758.  15,Limits,
  9759.  variables per SQL command          100
  9760.  16,Limits,
  9761.  command line length                500 characters
  9762.  17,Limits,
  9763.  length of LONG value in SQL*Plus   250 characters
  9764.  18,Limits,
  9765.  output line size                   500 characters (minimum = 5 characters)
  9766.  19,Limits,
  9767.  line after variable substitution   1,000 characters (internal only)
  9768.  20,Limits,
  9769.  number of lines per command        500 (assuming 80 characters per line)
  9770.  21,Limits,
  9771.  number of lines per page           50,000
  9772.  22,Limits,
  9773.  total row width                    60,000 characters in VMS; else, 32,767
  9774.  23,Limits,
  9775.  rows in an array fetch             5000 rows
  9776.  24,Limits,
  9777.  nested command files               20 for VMS, CMS, Unix; otherwise, 5
  9778.  25,Limits,
  9779.  page numbers                       99,999 pages
  9780.  26,Limits,
  9781.  
  9782.  27,Limits,
  9783.  See also:  commands, menu.
  9784.   1,Links,
  9785.  
  9786.   2,Links,
  9787.  
  9788.   3,Links,
  9789.                               Links
  9790.   4,Links,
  9791.  
  9792.   5,Links,
  9793.  A database link provides access to a remote database from the local
  9794.   6,Links,
  9795.  database. To use a link, you must know a valid username on a remote
  9796.   7,Links,
  9797.  database, local and remote systems must be connected to each other,
  9798.   8,Links,
  9799.  and SQL*Net must be active on both.  A non-ORACLE database requires
  9800.   9,Links,
  9801.  SQL*Connect active as well.
  9802.  10,Links,
  9803.  
  9804.  11,Links,
  9805.  To access a table in a remote database use its linkname in the FROM
  9806.  12,Links,
  9807.  clause of a query or a subquery.  SELECT * FROM powers.dept@PACIFIC
  9808.  13,Links,
  9809.  connects the user to the database link PACIFIC and accesses a table
  9810.  14,Links,
  9811.  named DEPT owned by POWERS.
  9812.  15,Links,
  9813.  
  9814.  16,Links,
  9815.  Database links are used in distributed queries.  A single statement
  9816.  17,Links,
  9817.  is usually limited to four links.   LONG columns cannot be selected
  9818.  18,Links,
  9819.  through a link.
  9820.  19,Links,
  9821.  
  9822.  20,Links,
  9823.  
  9824.  21,Links,
  9825.  See also: distributed query, remote databases, create db link, menu.
  9826.   1,Literals,
  9827.  
  9828.   2,Literals,
  9829.  
  9830.   3,Literals,
  9831.                                Literals
  9832.   4,Literals,
  9833.  
  9834.   5,Literals,
  9835.  A SQL literal is a number or character string.
  9836.   6,Literals,
  9837.  
  9838.   7,Literals,
  9839.  NUMERIC LITERALS may be integers like 3, 1444, 23, and 5280, or real
  9840.   8,Literals,
  9841.                   numbers like 3.14159, .25, -12, 2.e6, 7E4.  Numeric
  9842.   9,Literals,
  9843.                   literals in a list must be separated by commas; you
  9844.  10,Literals,
  9845.                   may add spaces after the commas for easier reading.
  9846.  11,Literals,
  9847.  
  9848.  12,Literals,
  9849.  STRING LITERALS  are one or more characters enclosed by apostrophes.
  9850.  13,Literals,
  9851.                   Use two adjacent apostrophes to write an apostrophe
  9852.  14,Literals,
  9853.                   in a string.  For example: 'You''re a strong, happy
  9854.  15,Literals,
  9855.                   person, aren''t you?' Note that two apostrophes are
  9856.  16,Literals,
  9857.                   NOT the same as a "quotation mark"; quotation marks
  9858.  17,Literals,
  9859.                   are sometimes used to enclose identifier names.
  9860.  18,Literals,
  9861.  
  9862.  19,Literals,
  9863.  DATE LITERALS    are string literals in the date format '09-JAN-42'.
  9864.  20,Literals,
  9865.  
  9866.  21,Literals,
  9867.  BOOLEAN LITERALS are the predefined constants TRUE, FALSE, and NULL.
  9868.  22,Literals,
  9869.  
  9870.  23,Literals,
  9871.  
  9872.  24,Literals,
  9873.  See also: identifiers, menu.
  9874.   1,Logical Operators,
  9875.  
  9876.   2,Logical Operators,
  9877.  
  9878.   3,Logical Operators,
  9879.                           Logical Operators
  9880.   4,Logical Operators,
  9881.  
  9882.   5,Logical Operators,
  9883.  Logical operators in SQL control the result of multiple conditions.
  9884.   6,Logical Operators,
  9885.  The table lists logical operators in the order they are evaluated:
  9886.   7,Logical Operators,
  9887.  
  9888.   8,Logical Operators,
  9889.  Operator  Function                  Example
  9890.   9,Logical Operators,
  9891.  -------------------------------------------------------------------
  9892.  10,Logical Operators,
  9893.  NOT       Reverses the result of    SELECT...WHERE NOT (bal = 0)
  9894.  11,Logical Operators,
  9895.            a logical expression
  9896.  12,Logical Operators,
  9897.            Exception: NOT (NULL)
  9898.  13,Logical Operators,
  9899.            evaluates to null.
  9900.  14,Logical Operators,
  9901.  
  9902.  15,Logical Operators,
  9903.  AND       Returns TRUE if all       ...WHERE A >= 1 AND B <= 5000
  9904.  16,Logical Operators,
  9905.            conditions are TRUE
  9906.  17,Logical Operators,
  9907.  
  9908.  18,Logical Operators,
  9909.  OR        Returns TRUE if any       ...WHERE A IS NULL OR B IS NULL
  9910.  19,Logical Operators,
  9911.            conditions are TRUE
  9912.  20,Logical Operators,
  9913.  
  9914.  21,Logical Operators,
  9915.  
  9916.  22,Logical Operators,
  9917.  
  9918.  23,Logical Operators,
  9919.  See also: conditions, expressions, boolean comparisons, menu.
  9920.   1,Loops,
  9921.  
  9922.   2,Loops,
  9923.  
  9924.   3,Loops,
  9925.                              Loops
  9926.   4,Loops,
  9927.  
  9928.   5,Loops,
  9929.  PL/SQL provides several forms of iterative control, the ability
  9930.   6,Loops,
  9931.  to repeat or skip sections of a block.  For details, see:
  9932.   7,Loops,
  9933.  
  9934.   8,Loops,
  9935.  
  9936.   9,Loops,
  9937.     loop (basic loops)      end loop      example numeric for
  9938.  10,Loops,
  9939.  
  9940.  11,Loops,
  9941.     while                   exit plsql    example cursor for
  9942.  12,Loops,
  9943.  
  9944.  13,Loops,
  9945.     numeric for             goto
  9946.  14,Loops,
  9947.  
  9948.  15,Loops,
  9949.     cursor for
  9950.  16,Loops,
  9951.  
  9952.  17,Loops,
  9953.  
  9954.  18,Loops,
  9955.  
  9956.  19,Loops,
  9957.  See also: blocks, commands, menu.
  9958.   1,Menu,
  9959.                                  Menu
  9960.   2,Menu,
  9961.  
  9962.   3,Menu,
  9963.  SQL TOPICS         PL/SQL TOPICS      FUNCTIONS           SQL*PLUS TOPICS
  9964.   4,Menu,
  9965.  ---------------    ----------------   ----------------    ---------------
  9966.   5,Menu,
  9967.  alias              attributes         1 row number        help
  9968.   6,Menu,
  9969.  comments           blocks             1 row char          commands
  9970.   7,Menu,
  9971.  conditions         commands           conversion          old commands
  9972.   8,Menu,
  9973.  data dictionary    cursors            date functions      overview
  9974.   9,Menu,
  9975.  delimiters         error handling     error reporting     buffer
  9976.  10,Menu,
  9977.  expressions        examples           group functions     files
  9978.  11,Menu,
  9979.  identifiers        loops              other functions     substitution
  9980.  12,Menu,
  9981.  keys               scoping rules      format dates        parameters
  9982.  13,Menu,
  9983.  links              sql in pl/sql      format numbers      remote databases
  9984.  14,Menu,
  9985.  literals           variables          format modifiers    dba
  9986.  15,Menu,
  9987.  nulls                                                     limits
  9988.  16,Menu,
  9989.  pseudo-columns     DATATYPES          OPERATORS
  9990.  17,Menu,
  9991.  reserved words     ----------------   ------------------- ===DIRECTIONS===
  9992.  18,Menu,
  9993.  sequences          boolean   number   arithmetic (& char)  Type help, a
  9994.  19,Menu,
  9995.  synonyms           char         raw   comparison           space, and then
  9996.  20,Menu,
  9997.  tables             date               like                 all or part of
  9998.  21,Menu,
  9999.  transactions       implicit           logical operators    a topic name.
  10000.  22,Menu,
  10001.  user id            long               set operators
  10002.  23,Menu,
  10003.  views (& indexes)  long raw           other operators      See also: index.
  10004.   1,NEXTVAL,
  10005.  
  10006.   2,NEXTVAL,
  10007.  
  10008.   3,NEXTVAL,
  10009.                               NEXTVAL
  10010.   4,NEXTVAL,
  10011.  
  10012.   5,NEXTVAL,
  10013.  The pseudo-column sequence.NEXTVAL in SQL generates the next number
  10014.   6,NEXTVAL,
  10015.  in the sequence specified, while sequence.CURRVAL gives the current
  10016.   7,NEXTVAL,
  10017.  number in the sequence. If you use NEXTVAL and CURRVAL for the same
  10018.   8,NEXTVAL,
  10019.  sequence in one SELECT statement, you always get the NEXTVAL number.
  10020.   9,NEXTVAL,
  10021.  NEXTVAL and CURRVAL:
  10022.  10,NEXTVAL,
  10023.  
  10024.  11,NEXTVAL,
  10025.  MAY be used within...              but may NOT be used...
  10026.  12,NEXTVAL,
  10027.  -------------------------------------------------------------------
  10028.  13,NEXTVAL,
  10029.  the SELECT list of a SELECT        in the SELECT list for a view,
  10030.  14,NEXTVAL,
  10031.  statement (except in views)        or in a subquery
  10032.  15,NEXTVAL,
  10033.  
  10034.  16,NEXTVAL,
  10035.  the values list of an INSERT       with DISTINCT or set operators
  10036.  17,NEXTVAL,
  10037.  
  10038.  18,NEXTVAL,
  10039.  the SET expression of UPDATE       with ORDER BY, GROUP BY, or
  10040.  19,NEXTVAL,
  10041.                                     HAVING in a SELECT statement.
  10042.  20,NEXTVAL,
  10043.  
  10044.  21,NEXTVAL,
  10045.  
  10046.  22,NEXTVAL,
  10047.  See also: example nextval, pseudo-columns, sequence, select list,
  10048.  23,NEXTVAL,
  10049.            select, insert, update, order by, group by, commands, menu.
  10050.   1,NOAUDIT,
  10051.  
  10052.   2,NOAUDIT,
  10053.  
  10054.   3,NOAUDIT,
  10055.                                   NOAUDIT
  10056.   4,NOAUDIT,
  10057.                                                                 SQL statement
  10058.   5,NOAUDIT,
  10059.  NOAUDIT can be used in two ways:  1) to partially or completely undo a prior
  10060.   6,NOAUDIT,
  10061.  system AUDIT, or 2) to partially or completely undo a prior AUDIT statement.
  10062.   7,NOAUDIT,
  10063.  
  10064.   8,NOAUDIT,
  10065.  *First Method*
  10066.   9,NOAUDIT,
  10067.  
  10068.  10,NOAUDIT,
  10069.  NOAUDIT system_option, system_option,... | ALL
  10070.  11,NOAUDIT,
  10071.      WHENEVER SUCCESSFUL | WHENEVER NOT SUCCESSFUL
  10072.  12,NOAUDIT,
  10073.  
  10074.  13,NOAUDIT,
  10075.  This type of NOAUDIT partially or completely undoes a prior system AUDIT.
  10076.  14,NOAUDIT,
  10077.  This form requires DBA privileges.
  10078.  15,NOAUDIT,
  10079.  
  10080.  16,NOAUDIT,
  10081.      system_option or ALL
  10082.  17,NOAUDIT,
  10083.          is CONNECT, DBA, NOT EXISTS, or RESOURCE.  ALL is all options.
  10084.  18,NOAUDIT,
  10085.  
  10086.  19,NOAUDIT,
  10087.      WHENEVER SUCCESSFUL or WHENEVER NOT SUCCESSFUL
  10088.  20,NOAUDIT,
  10089.          turns auditing off for successful or unsuccessful system accesses.
  10090.  21,NOAUDIT,
  10091.          If omitted, auditing is turned off for all system accesses.
  10092.  22,NOAUDIT,
  10093.  
  10094.  23,NOAUDIT,
  10095.  *Second Method*
  10096.  24,NOAUDIT,
  10097.  
  10098.  25,NOAUDIT,
  10099.  NOAUDIT option, option,... | ALL
  10100.  26,NOAUDIT,
  10101.      ON object | DEFAULT
  10102.  27,NOAUDIT,
  10103.      WHENEVER SUCCESSFUL | WHENEVER NOT SUCCESSFUL
  10104.  28,NOAUDIT,
  10105.  
  10106.  29,NOAUDIT,
  10107.  This type of NOAUDIT partially or completely undoes a prior AUDIT statement.
  10108.  30,NOAUDIT,
  10109.  You must own the object NOAUDIT operates on.  You must have DBA privileges
  10110.  31,NOAUDIT,
  10111.  to change the auditing options set for DEFAULT.  NOAUDIT also commits the
  10112.  32,NOAUDIT,
  10113.  current transaction.
  10114.  33,NOAUDIT,
  10115.  
  10116.  34,NOAUDIT,
  10117.      option or ALL
  10118.  35,NOAUDIT,
  10119.          for tables:    ALTER, AUDIT, COMMENT, DELETE, GRANT, INDEX,
  10120.  36,NOAUDIT,
  10121.                         INSERT, LOCK, RENAME, SELECT, or UPDATE
  10122.  37,NOAUDIT,
  10123.  
  10124.  38,NOAUDIT,
  10125.          for views:     AUDIT, DELETE, GRANT, INSERT, LOCK, RENAME, SELECT,
  10126.  39,NOAUDIT,
  10127.                         or UPDATE
  10128.  40,NOAUDIT,
  10129.  
  10130.  41,NOAUDIT,
  10131.          for sequences: ALTER, AUDIT, GRANT, or SELECT
  10132.  42,NOAUDIT,
  10133.  
  10134.  43,NOAUDIT,
  10135.          for synonyms:  the same options as those of their base table/view.
  10136.  44,NOAUDIT,
  10137.  
  10138.  45,NOAUDIT,
  10139.          ALL means all valid options.
  10140.  46,NOAUDIT,
  10141.  
  10142.  47,NOAUDIT,
  10143.      object | DEFAULT
  10144.  48,NOAUDIT,
  10145.          is a table, view, or sequence you own, or the DEFAULT options for
  10146.  49,NOAUDIT,
  10147.          the auditing of new tables.
  10148.  50,NOAUDIT,
  10149.  
  10150.  51,NOAUDIT,
  10151.      WHENEVER SUCCESSFUL or WHENEVER NOT SUCCESSFUL
  10152.  52,NOAUDIT,
  10153.          turns auditing off for successful or unsuccessful table accesses.
  10154.  53,NOAUDIT,
  10155.          If omitted, auditing is turned off for all table accesses.
  10156.  54,NOAUDIT,
  10157.  
  10158.  55,NOAUDIT,
  10159.  
  10160.  56,NOAUDIT,
  10161.  See also: audit, grant, commands, menu.
  10162.   1,NOWAIT,
  10163.  
  10164.   2,NOWAIT,
  10165.  
  10166.   3,NOWAIT,
  10167.                               NOWAIT
  10168.   4,NOWAIT,
  10169.                                                          SQL clauses
  10170.   5,NOWAIT,
  10171.  SELECT list... FROM...
  10172.   6,NOWAIT,
  10173.     FOR UPDATE OF column, column,... NOWAIT;   --one column is required
  10174.   7,NOWAIT,
  10175.  
  10176.   8,NOWAIT,
  10177.  LOCK TABLE [user.]table [,[user.]table]...
  10178.   9,NOWAIT,
  10179.     IN lockmode MODE [NOWAIT]
  10180.  10,NOWAIT,
  10181.  
  10182.  11,NOWAIT,
  10183.  NOWAIT is used in the SELECT and LOCK TABLE statements.  When used in
  10184.  12,NOWAIT,
  10185.  the SELECT statement, NOWAIT specifies that ORACLE should not wait for
  10186.  13,NOWAIT,
  10187.  the row if the row has already been locked by another user.  Instead,
  10188.  14,NOWAIT,
  10189.  ORACLE will return control to the user.   When used in the LOCK TABLE
  10190.  15,NOWAIT,
  10191.  statement, NOWAIT specifies that ORACLE should not wait for the table
  10192.  16,NOWAIT,
  10193.  if the table has already been locked by another user.  (ORACLE will
  10194.  17,NOWAIT,
  10195.  return control to the user.)
  10196.  18,NOWAIT,
  10197.  
  10198.  19,NOWAIT,
  10199.  See also: for update of, lock table, select, example delete, commit,
  10200.  20,NOWAIT,
  10201.            rollback, insert, delete, commands, menu.
  10202.   1,NULL,
  10203.  
  10204.   2,NULL,
  10205.  
  10206.   3,NULL,
  10207.                                   NULL
  10208.   4,NULL,
  10209.                                                       PL/SQL statement
  10210.   5,NULL,
  10211.  NULL;
  10212.   6,NULL,
  10213.  
  10214.   7,NULL,
  10215.  The NULL statement is optional, and has no effect on block processing.
  10216.   8,NULL,
  10217.  Use it to make conditional statements easier to read.  Some examples:
  10218.   9,NULL,
  10219.  
  10220.  10,NULL,
  10221.     EXCEPTION                           IF job_title = 'DESIGNER' THEN
  10222.  11,NULL,
  10223.       WHEN VALUE ERROR THEN                GOTO calc_bonus;
  10224.  12,NULL,
  10225.         INSERT INTO parts_table         ELSE
  10226.  13,NULL,
  10227.         VALUES ('ZZ', 9999);               NULL;
  10228.  14,NULL,
  10229.       WHEN OTHERS THEN                  END IF;
  10230.  15,NULL,
  10231.         NULL;
  10232.  16,NULL,
  10233.  
  10234.  17,NULL,
  10235.  
  10236.  18,NULL,
  10237.  The NULL statement has nothing at all to do with null values; IS NULL
  10238.  19,NULL,
  10239.  and IS NOT NULL are Comparison Operators.
  10240.  20,NULL,
  10241.  
  10242.  21,NULL,
  10243.  
  10244.  22,NULL,
  10245.  See also: nulls, comparison (operators), conditions, commands, menu.
  10246.   1,NUMBER,
  10247.  
  10248.   2,NUMBER,
  10249.  
  10250.   3,NUMBER,
  10251.                                NUMBER
  10252.   4,NUMBER,
  10253.  
  10254.   5,NUMBER,
  10255.  NUMBER(precision, scale)            --(precision, scale) optional
  10256.   6,NUMBER,
  10257.  
  10258.   7,NUMBER,
  10259.  The NUMBER datatype stores numeric data.  When declaring a column
  10260.   8,NUMBER,
  10261.  to be a NUMBER you can specify the total number of digits allowed
  10262.   9,NUMBER,
  10263.  (precision), and the number of digits permitted after the decimal
  10264.  10,NUMBER,
  10265.  point (scale). If a value has more digits than the number allowed,
  10266.  11,NUMBER,
  10267.  the error message "exceeds precision" is returned. Any value with
  10268.  12,NUMBER,
  10269.  more decimal digits than allowed is rounded.
  10270.  13,NUMBER,
  10271.  
  10272.  14,NUMBER,
  10273.  When scale is a negative number, an incoming value is rounded to
  10274.  15,NUMBER,
  10275.  that number of places LEFT of the decimal point. If precision is
  10276.  16,NUMBER,
  10277.  specified and scale is omitted, the incoming value is rounded to
  10278.  17,NUMBER,
  10279.  a whole number.  If precision is omitted, the value is stored as
  10280.  18,NUMBER,
  10281.  is, to the limit of the system's maximum precision and scale.
  10282.  19,NUMBER,
  10283.  
  10284.  20,NUMBER,
  10285.  
  10286.  21,NUMBER,
  10287.  See also: conversion, variables, char, long, date, raw, boolean, menu.
  10288.   1,Nulls,
  10289.  
  10290.   2,Nulls,
  10291.  
  10292.   3,Nulls,
  10293.                                Nulls
  10294.   4,Nulls,
  10295.  
  10296.   5,Nulls,
  10297.  A null specifies that data is unknown, missing, or not applicable.
  10298.   6,Nulls,
  10299.  Columns of any datatype may contain null values, unless the column
  10300.   7,Nulls,
  10301.  was defined as NOT NULL when the table was created.
  10302.   8,Nulls,
  10303.  
  10304.   9,Nulls,
  10305.  A null value is appropriate when the actual value is not known, or
  10306.  10,Nulls,
  10307.  when a data value would be meaningless.  Null is not the same as a
  10308.  11,Nulls,
  10309.  value of zero.  An expression that contains null evaluates to null.
  10310.  12,Nulls,
  10311.  
  10312.  13,Nulls,
  10313.  Use the NVL function to temporarily convert a null value to a data
  10314.  14,Nulls,
  10315.  value.  NVL(comm, 0) returns the value of comm if comm is not null,
  10316.  15,Nulls,
  10317.  or 0 if comm is null.
  10318.  16,Nulls,
  10319.  
  10320.  17,Nulls,
  10321.  In comparing a null value, use IS or IS NOT as the operator; using
  10322.  18,Nulls,
  10323.  any other comparison operator on a null value always returns null.
  10324.  19,Nulls,
  10325.  
  10326.  20,Nulls,
  10327.  Group functions ignore null values.
  10328.  21,Nulls,
  10329.  
  10330.  22,Nulls,
  10331.  
  10332.  23,Nulls,
  10333.  See also: example nulls, null (statement), other functions (NVL),
  10334.  24,Nulls,
  10335.            group functions, comparison (operators), menu.
  10336.   1,Numeric FOR,
  10337.  
  10338.   2,Numeric FOR,
  10339.  
  10340.   3,Numeric FOR,
  10341.                              Numeric FOR
  10342.   4,Numeric FOR,
  10343.                                                       PL/SQL statement
  10344.   5,Numeric FOR,
  10345.  
  10346.   6,Numeric FOR,
  10347.  FOR index IN first_integer..second_integer LOOP
  10348.   7,Numeric FOR,
  10349.      sequence_of_statements
  10350.   8,Numeric FOR,
  10351.  END LOOP;
  10352.   9,Numeric FOR,
  10353.  
  10354.  10,Numeric FOR,
  10355.  FOR index IN REVERSE first_integer..second_integer LOOP
  10356.  11,Numeric FOR,
  10357.      sequence_of_statements
  10358.  12,Numeric FOR,
  10359.  END LOOP;
  10360.  13,Numeric FOR,
  10361.  
  10362.  14,Numeric FOR,
  10363.  A numeric FOR loop's sequence_of_statements is executed once for each
  10364.  15,Numeric FOR,
  10365.  integer in the range between the first and second integers.  Starting
  10366.  16,Numeric FOR,
  10367.  with the first_integer, index is incremented by one at each iteration
  10368.  17,Numeric FOR,
  10369.  until index exceeds the second_integer and ends the loop.  IN REVERSE
  10370.  18,Numeric FOR,
  10371.  starts index with the second_integer. Index is implicitly declared to
  10372.  19,Numeric FOR,
  10373.  be a NUMBER, visible only in the loop, and treated as a constant: you
  10374.  20,Numeric FOR,
  10375.  can use its current value, but you can't change it.
  10376.  21,Numeric FOR,
  10377.  
  10378.  22,Numeric FOR,
  10379.  
  10380.  23,Numeric FOR,
  10381.  For other loops see: loop, while, cursor for.
  10382.  24,Numeric FOR,
  10383.  See also: example numeric for, number, commands, menu.
  10384.   1,OPEN,
  10385.  
  10386.   2,OPEN,
  10387.                                OPEN
  10388.   3,OPEN,
  10389.                                                  PL/SQL statement
  10390.   4,OPEN,
  10391.  OPEN cursor
  10392.   5,OPEN,
  10393.      (parameter1_value, parameter2_value...);          --optional
  10394.   6,OPEN,
  10395.  
  10396.   7,OPEN,
  10397.  
  10398.   8,OPEN,
  10399.  OPEN evaluates the query associated with cursor, which must have
  10400.   9,OPEN,
  10401.  been previously declared. If the DECLARE CURSOR lists parameters,
  10402.  10,OPEN,
  10403.  the OPEN statement must list values for the parameters following
  10404.  11,OPEN,
  10405.  the cursor name.
  10406.  12,OPEN,
  10407.  
  10408.  13,OPEN,
  10409.  
  10410.  14,OPEN,
  10411.  
  10412.  15,OPEN,
  10413.  See also: example cursors, cursors, declare cursor, close,
  10414.  16,OPEN,
  10415.            commands, menu.
  10416.   1,ORDER BY,
  10417.  
  10418.   2,ORDER BY,
  10419.  
  10420.   3,ORDER BY,
  10421.                              ORDER BY
  10422.   4,ORDER BY,
  10423.                                                       SQL clause
  10424.   5,ORDER BY,
  10425.  SELECT ...                       SELECT ...
  10426.   6,ORDER BY,
  10427.      ORDER BY expr ASC,...            ORDER BY expr DESC,...
  10428.   7,ORDER BY,
  10429.  
  10430.   8,ORDER BY,
  10431.      ORDER BY position ASC,...        ORDER BY position DESC,...
  10432.   9,ORDER BY,
  10433.  
  10434.  10,ORDER BY,
  10435.  The ORDER BY clause specifies the order in which to display the
  10436.  11,ORDER BY,
  10437.  results of a query.  Expr  references one or more SELECT clause
  10438.  12,ORDER BY,
  10439.  columns or FROM clause tables.  Position is a number indicating
  10440.  13,ORDER BY,
  10441.  the place of a column in the SELECT clause. ASC or DESC specify
  10442.  14,ORDER BY,
  10443.  ascending or descending order for the sort; the default is ASC.
  10444.  15,ORDER BY,
  10445.  
  10446.  16,ORDER BY,
  10447.  ORDER BY cannot be used in subqueries of INSERT, UPDATE, CREATE
  10448.  17,ORDER BY,
  10449.  TABLE or CREATE VIEW statements. An ORDER BY cancels the effect
  10450.  18,ORDER BY,
  10451.  of a CONNECT BY clause in the same statement.
  10452.  19,ORDER BY,
  10453.  
  10454.  20,ORDER BY,
  10455.  
  10456.  21,ORDER BY,
  10457.  See also: example date functions, select, query, subquery, insert,
  10458.  22,ORDER BY,
  10459.            update, create table, create view, connect by, menu.
  10460.   1,Old Commands,
  10461.  
  10462.   2,Old Commands,
  10463.  
  10464.   3,Old Commands,
  10465.                                 Old Commands
  10466.   4,Old Commands,
  10467.  
  10468.   5,Old Commands,
  10469.  These old SQL*Plus commands still work, although SQL*Plus provides newer
  10470.   6,Old Commands,
  10471.  commands with better functionality.
  10472.   7,Old Commands,
  10473.  
  10474.   8,Old Commands,
  10475.  
  10476.   9,Old Commands,
  10477.  BTI[TLE] text
  10478.  10,Old Commands,
  10479.      BTITLE displays a title at the bottom of each report page.  The old
  10480.  11,Old Commands,
  10481.      form of BTITLE offers more limited formatting than the new form, but
  10482.  12,Old Commands,
  10483.      provides compatibility with UFI (a predecessor of SQL*Plus). The old
  10484.  13,Old Commands,
  10485.      form defines the bottom title as an empty line followed by a line with
  10486.  14,Old Commands,
  10487.      centered text.  See OLD TTITLE for details.
  10488.  15,Old Commands,
  10489.  
  10490.  16,Old Commands,
  10491.  
  10492.  17,Old Commands,
  10493.  COL[UMN] {column|expr} DEF[AULT]              Replaced by: COLUMN CLEAR
  10494.  18,Old Commands,
  10495.       COLUMN DEFAULT resets the display attributes for a given column to
  10496.  19,Old Commands,
  10497.       default values.  It has the same effect as COLUMN CLEAR.
  10498.  20,Old Commands,
  10499.  
  10500.  21,Old Commands,
  10501.  
  10502.  22,Old Commands,
  10503.  DOC[UMENT]                                           Replaced by: REMARK
  10504.  23,Old Commands,
  10505.      DOCUMENT begins a block of documentation in a command file.
  10506.  24,Old Commands,
  10507.      When you type DOCUMENT and press RETURN, SQL*Plus displays DOC> in
  10508.  25,Old Commands,
  10509.      place of SQL> until you end the documentation.  Enter # (pound) on a
  10510.  26,Old Commands,
  10511.      line by itself to end the documentation.  If DOCUMENT is OFF, SQL*Plus
  10512.  27,Old Commands,
  10513.      reads further lines of documentation as commands.  See SET DOCUMENT.
  10514.  28,Old Commands,
  10515.  
  10516.  29,Old Commands,
  10517.  
  10518.  30,Old Commands,
  10519.  NEWPAGE [1|n]                         Replaced by: SET command's NEWPAGE
  10520.  31,Old Commands,
  10521.      NEWPAGE advances spooled output n lines beyond the beginning of the
  10522.  32,Old Commands,
  10523.      next page.
  10524.  33,Old Commands,
  10525.  
  10526.  34,Old Commands,
  10527.  
  10528.  35,Old Commands,
  10529.  SET BUF[FER] {buffer|SQL}
  10530.  36,Old Commands,
  10531.      SET BUFFER makes the specified buffer the current buffer.  Initially,
  10532.  37,Old Commands,
  10533.      the SQL buffer is the current buffer.  SQL*Plus doesn't use multiple
  10534.  38,Old Commands,
  10535.      buffers; the SQL buffer should meet your needs.  If the buffer name
  10536.  39,Old Commands,
  10537.      you enter does not already exist, SET BUFFER creates and names the
  10538.  40,Old Commands,
  10539.      buffer.  The buffer is erased when you exit SQL*Plus.
  10540.  41,Old Commands,
  10541.  
  10542.  42,Old Commands,
  10543.      Running a query automatically makes the SQL buffer the current one.
  10544.  43,Old Commands,
  10545.      GET and SAVE copy text from one buffer to another.  CLEAR BUFFER
  10546.  44,Old Commands,
  10547.      erases text from the current buffer.  CLEAR SQL erases text from the
  10548.  45,Old Commands,
  10549.      SQL buffer when you're using another one.
  10550.  46,Old Commands,
  10551.  
  10552.  47,Old Commands,
  10553.  
  10554.  48,Old Commands,
  10555.  SET DOC[UMENT] {OFF|ON}
  10556.  49,Old Commands,
  10557.      SET DOCUMENT ON enables the DOCUMENT command, and SET DOCUMENT OFF
  10558.  50,Old Commands,
  10559.      disables it.  If you disable DOCUMENT, SQL*Plus reads any lines after
  10560.  51,Old Commands,
  10561.      a DOCUMENT command as commands.  See DOCUMENT for details.
  10562.  52,Old Commands,
  10563.  
  10564.  53,Old Commands,
  10565.  
  10566.  54,Old Commands,
  10567.  SET TRU[NCATE] {OFF|ON}
  10568.  55,Old Commands,
  10569.      SET TRUNCATE controls whether SQL*Plus truncates or wraps a data item
  10570.  56,Old Commands,
  10571.      that is too long for the current line width.  ON and SET WRAP OFF work
  10572.  57,Old Commands,
  10573.      the same way.  You may prefer to use WRAP, because the SHOW command
  10574.  58,Old Commands,
  10575.      recognizes WRAP and does not recognize TRUNCATE.
  10576.  59,Old Commands,
  10577.  
  10578.  60,Old Commands,
  10579.  
  10580.  61,Old Commands,
  10581.  TTI[TLE] text
  10582.  62,Old Commands,
  10583.      TTITLE displays a title at the top of each report page.  The old form
  10584.  63,Old Commands,
  10585.      of TTITLE has more limited formatting than the new form, but is
  10586.  64,Old Commands,
  10587.      compatible with UFI, a SQL*Plus predecessor.  The old form defines the
  10588.  65,Old Commands,
  10589.      top title as a line with the date left-aligned and the page number
  10590.  66,Old Commands,
  10591.      right-aligned, a line with centered text, and then a blank line.  Text
  10592.  67,Old Commands,
  10593.      is the title displayed.
  10594.  68,Old Commands,
  10595.  
  10596.  69,Old Commands,
  10597.      SQL*Plus centers text based on the SET LINESIZE setting.  A separator
  10598.  70,Old Commands,
  10599.      character (|) begins a new line; two line separator characters (||)
  10600.  71,Old Commands,
  10601.      insert a blank line.  Use SET HEADSEP to change the line separator
  10602.  72,Old Commands,
  10603.      character.  Control the formatting of page numbers in the old forms of
  10604.  73,Old Commands,
  10605.      TTITLE and BTITLE by defining the variable "_page".  The default _page
  10606.  74,Old Commands,
  10607.      value is the formatting string, "page &P4".  To alter it, DEFINE _page
  10608.  75,Old Commands,
  10609.      with a new string:
  10610.  76,Old Commands,
  10611.  
  10612.  77,Old Commands,
  10613.            SQL> SET ESCAPE /SQL> DEFINE _page = 'Page /&P2'
  10614.  78,Old Commands,
  10615.  
  10616.  79,Old Commands,
  10617.      The string prints "Page" and formats the page number to a width of 2.
  10618.  80,Old Commands,
  10619.      You can substitute any text for "Page" and any number for the width.
  10620.  81,Old Commands,
  10621.      You must set Escape so SQL*Plus doesn't read the ampersand (&) as a
  10622.  82,Old Commands,
  10623.      substitution variable.  The SET command's ESCAPE variable sets the
  10624.  83,Old Commands,
  10625.      escape character.
  10626.  84,Old Commands,
  10627.  
  10628.  85,Old Commands,
  10629.      SQL*Plus interprets TTITLE in the old form if a valid new-form clause
  10630.  86,Old Commands,
  10631.      does not immediately follow the command name.
  10632.  87,Old Commands,
  10633.  
  10634.  88,Old Commands,
  10635.      Example:  To use the old TTITLE to set a top title with a left-aligned
  10636.  89,Old Commands,
  10637.                date and a right-aligned page number on one line, MARKETING
  10638.  90,Old Commands,
  10639.                on the next line, and PERSONNEL REPORT on the third, enter:
  10640.  91,Old Commands,
  10641.  
  10642.  92,Old Commands,
  10643.                SQL> TTITLE 'MARKETING | PERSONNEL REPORT'
  10644.  93,Old Commands,
  10645.  
  10646.  94,Old Commands,
  10647.      See also:  commands, menu.
  10648.   1,Other Functions,
  10649.  
  10650.   2,Other Functions,
  10651.  
  10652.   3,Other Functions,
  10653.                      Other Functions
  10654.   4,Other Functions,
  10655.  
  10656.   5,Other Functions,
  10657.  DECODE(expr, search1, result1,     Returns result1 if expr = search1,
  10658.   6,Other Functions,
  10659.    search2, result2,...default)     result2 if expr = search2, etc. If
  10660.   7,Other Functions,
  10661.                                     no match is found, returns default
  10662.   8,Other Functions,
  10663.                                     or null if default omitted.
  10664.   9,Other Functions,
  10665.  
  10666.  10,Other Functions,
  10667.  DUMP(expr, format, start_with,     Shows format of expr as 8=octal,
  10668.  11,Other Functions,
  10669.    length)                          10=decimal, 16=hex, 17=character;
  10670.  12,Other Functions,
  10671.                                     start_position and length set the
  10672.  13,Other Functions,
  10673.                                     part shown; omit to show entirely.
  10674.  14,Other Functions,
  10675.  
  10676.  15,Other Functions,
  10677.  GREATEST(expr1, expr2, expr3...)   Returns greatest expr value in the
  10678.  16,Other Functions,
  10679.                                     list, converted to expr1 datatype.
  10680.  17,Other Functions,
  10681.  
  10682.  18,Other Functions,
  10683.  LEAST(expr1, expr2, expr3...)      Returns least expr value in list,
  10684.  19,Other Functions,
  10685.                                     converted to expr1 datatype.
  10686.  20,Other Functions,
  10687.  
  10688.  21,Other Functions,
  10689.  DUMP, GREATEST, and LEAST are not available in PL/SQL.
  10690.  22,Other Functions,
  10691.  
  10692.  23,Other Functions,
  10693.  
  10694.  24,Other Functions,
  10695.  NVL(expr1, expr2)      Returns expr1 if not null; if null, returns
  10696.  25,Other Functions,
  10697.                         expr2.  Returned datatype must match expr1.
  10698.  26,Other Functions,
  10699.  
  10700.  27,Other Functions,
  10701.  UID                    Returns the unique integer identifier of each user.
  10702.  28,Other Functions,
  10703.  
  10704.  29,Other Functions,
  10705.  USER                   Returns the currently signed on username.
  10706.  30,Other Functions,
  10707.  
  10708.  31,Other Functions,
  10709.  USERENV('ENTRYID')     Returns available auditing entry identifier.
  10710.  32,Other Functions,
  10711.  
  10712.  33,Other Functions,
  10713.  USERENV('LANGUAGE')    Returns language set by LANGUAGE INIT.ORA.
  10714.  34,Other Functions,
  10715.  
  10716.  35,Other Functions,
  10717.  USERENV('SESSIONID')   Returns user's auditing session identifier.
  10718.  36,Other Functions,
  10719.  
  10720.  37,Other Functions,
  10721.  USERENV('TERMINAL')    Returns terminal's operating system identifier.
  10722.  38,Other Functions,
  10723.  
  10724.  39,Other Functions,
  10725.  VSIZE(expr)            Returns the number of bytes used to store the
  10726.  40,Other Functions,
  10727.                         ORACLE internal representation of expr.
  10728.  41,Other Functions,
  10729.  
  10730.  42,Other Functions,
  10731.  
  10732.  43,Other Functions,
  10733.  See also: expressions, null, user id, menu.
  10734.   1,Other Operators,
  10735.  
  10736.   2,Other Operators,
  10737.  
  10738.   3,Other Operators,
  10739.                                 Other Operators
  10740.   4,Other Operators,
  10741.  
  10742.   5,Other Operators,
  10743.      Operator    Meaning or Function in SQL
  10744.   6,Other Operators,
  10745.  --------------------------------------------------------------------------
  10746.   7,Other Operators,
  10747.      (+)         The preceding column is the outer join column in a join.
  10748.   8,Other Operators,
  10749.  
  10750.   9,Other Operators,
  10751.       *          Selects all columns from the table in a query.
  10752.  10,Other Operators,
  10753.  
  10754.  11,Other Operators,
  10755.      table.*     Selects all columns from the specified table in a query.
  10756.  12,Other Operators,
  10757.  
  10758.  13,Other Operators,
  10759.      ALL         Returns duplicate values from a query or aggregation.
  10760.  14,Other Operators,
  10761.  
  10762.  15,Other Operators,
  10763.      DISTINCT    Eliminates duplicate values from the result of a query
  10764.  16,Other Operators,
  10765.                  or from an aggregate expression.  The default is ALL.
  10766.  17,Other Operators,
  10767.  
  10768.  18,Other Operators,
  10769.      PRIOR       Used in the START WITH clause of a tree-structured query
  10770.  19,Other Operators,
  10771.                  to define the adjacent term as parent of the other term.
  10772.  20,Other Operators,
  10773.  
  10774.  21,Other Operators,
  10775.  
  10776.  22,Other Operators,
  10777.  
  10778.  23,Other Operators,
  10779.  See also: outer join, select, query, tree-structured query, menu.
  10780.   1,Outer Join,
  10781.  
  10782.   2,Outer Join,
  10783.  
  10784.   3,Outer Join,
  10785.                              Outer Join
  10786.   4,Outer Join,
  10787.  
  10788.   5,Outer Join,
  10789.  SELECT ...
  10790.   6,Outer Join,
  10791.    FROM table1, table2, ...
  10792.   7,Outer Join,
  10793.    WHERE table1.column = table2.column (+)
  10794.   8,Outer Join,
  10795.  
  10796.   9,Outer Join,
  10797.  
  10798.  10,Outer Join,
  10799.  The outer join operator (+) extends the result of a normal join by
  10800.  11,Outer Join,
  10801.  returning all rows with matching columns from the two tables, plus
  10802.  12,Outer Join,
  10803.  any non-matching rows from the table.column with (+) following it.
  10804.  13,Outer Join,
  10805.  
  10806.  14,Outer Join,
  10807.  You may outer join a table to only one other table within a single
  10808.  15,Outer Join,
  10809.  SELECT statement.
  10810.  16,Outer Join,
  10811.  
  10812.  17,Outer Join,
  10813.  
  10814.  18,Outer Join,
  10815.  
  10816.  19,Outer Join,
  10817.  See also: example outer join, select, uses of select, menu.
  10818.   1,Overview,
  10819.  
  10820.   2,Overview,
  10821.  
  10822.   3,Overview,
  10823.                              Overview (SQL*Plus)
  10824.   4,Overview,
  10825.  
  10826.   5,Overview,
  10827.  You can use SQL*Plus with SQL and its procedural extension, PL/SQL.  SQL
  10828.   6,Overview,
  10829.  enables you to store and retrieve data in the ORACLE relational database
  10830.   7,Overview,
  10831.  management system.  SQL*Plus enables you to manipulate SQL commands and
  10832.   8,Overview,
  10833.  PL/SQL blocks, and to perform many other tasks.  With SQL*Plus, you can:
  10834.   9,Overview,
  10835.  
  10836.  10,Overview,
  10837.   -  enter, edit, store, retrieve, and run SQL commands and PL/SQL blocks
  10838.  11,Overview,
  10839.   -  format, perform calculations on, store, and print query results
  10840.  12,Overview,
  10841.   -  list column definitions for any table
  10842.  13,Overview,
  10843.   -  access and copy data between SQL databases
  10844.  14,Overview,
  10845.   -  send messages to and accept responses from an end user
  10846.  15,Overview,
  10847.  
  10848.  16,Overview,
  10849.  
  10850.  17,Overview,
  10851.  Basic SQL*Plus Concepts
  10852.  18,Overview,
  10853.  
  10854.  19,Overview,
  10855.            Command - An instruction you give SQL*Plus or the ORACLE
  10856.  20,Overview,
  10857.                      RDBMS.
  10858.  21,Overview,
  10859.  
  10860.  22,Overview,
  10861.              Block - A group of SQL and PL/SQL commands related to
  10862.  23,Overview,
  10863.                      one another through procedural logic.
  10864.  24,Overview,
  10865.  
  10866.  25,Overview,
  10867.              Table - The basic unit of storage in the ORACLE RDBMS.
  10868.  26,Overview,
  10869.  
  10870.  27,Overview,
  10871.              Query - A SELECT statement that retrieves information
  10872.  28,Overview,
  10873.                      from one or more tables.
  10874.  29,Overview,
  10875.  
  10876.  30,Overview,
  10877.      Query results - The data retrieved by a query.
  10878.  31,Overview,
  10879.  
  10880.  32,Overview,
  10881.             Report - Query results formatted by you with SQL*Plus
  10882.  33,Overview,
  10883.                      commands.
  10884.  34,Overview,
  10885.  
  10886.  35,Overview,
  10887.  Entering and Executing Commands
  10888.  36,Overview,
  10889.  
  10890.  37,Overview,
  10891.  Your computer's cursor (usually an underline, rectangular block, or slash)
  10892.  38,Overview,
  10893.  appears after the command prompt.  The cursor is where the next character
  10894.  39,Overview,
  10895.  you type appears on the screen.  You can enter commands in uppercase or
  10896.  40,Overview,
  10897.  lowercase in SQL*Plus.  As you type SQL*Plus, SQL, and PL/SQL commands,
  10898.  41,Overview,
  10899.  use at least one space, tab, or RETURN between words.  You can use extra
  10900.  42,Overview,
  10901.  spaces, tabs, and RETURNs between words to make the code easier to read.
  10902.  43,Overview,
  10903.  
  10904.  44,Overview,
  10905.  You can enter three kinds of commands at the command prompt:
  10906.  45,Overview,
  10907.  
  10908.  46,Overview,
  10909.       -  SQL commands, for working with information in the database
  10910.  47,Overview,
  10911.       -  PL/SQL blocks, also for working with information in the database
  10912.  48,Overview,
  10913.       -  SQL*Plus commands for formatting query results, setting options,
  10914.  49,Overview,
  10915.              and editing and storing SQL and PL/SQL commands
  10916.  50,Overview,
  10917.  
  10918.  51,Overview,
  10919.   End a SQL command with a ; (semicolon) at the end of a line
  10920.  52,Overview,
  10921.                          a / (slash) on a line by itself
  10922.  53,Overview,
  10923.                          a blank line
  10924.  54,Overview,
  10925.  
  10926.  55,Overview,
  10927.  A semicolon (;) tells SQL*Plus to run the command.  Type ; at the end of
  10928.  56,Overview,
  10929.  the last line and press RETURN to execute.  If you press RETURN without
  10930.  57,Overview,
  10931.  a semicolon, SQL*Plus displays the next line number.  Type ; and press
  10932.  58,Overview,
  10933.  RETURN again to run the command.  A slash (/) on a line by itself also
  10934.  59,Overview,
  10935.  tells SQL*Plus to run the command.  Press RETURN after the last command
  10936.  60,Overview,
  10937.  line.  At the next line number, type / and press RETURN again.
  10938.  61,Overview,
  10939.  
  10940.  62,Overview,
  10941.  
  10942.  63,Overview,
  10943.  Running PL/SQL Blocks
  10944.  64,Overview,
  10945.  
  10946.  65,Overview,
  10947.  PL/SQL blocks begin with DECLARE, BEGIN, or a block name.  SQL*Plus treats
  10948.  66,Overview,
  10949.  PL/SQL blocks the same as SQL commands, except that a semicolon (;) or a
  10950.  67,Overview,
  10951.  blank line does not terminate and execute a block; terminate PL/SQL blocks
  10952.  68,Overview,
  10953.  by entering a period (.) by itself on a new line.  To execute the block
  10954.  69,Overview,
  10955.  currently in the SQL buffer, use the RUN or / (slash) command.
  10956.  70,Overview,
  10957.  
  10958.  71,Overview,
  10959.  Example: You might enter and run the following PL/SQL block:
  10960.  72,Overview,
  10961.  
  10962.  73,Overview,
  10963.      SQL> DECLARE
  10964.  74,Overview,
  10965.         2     x   NUMBER := 100;
  10966.  75,Overview,
  10967.         3  BEGIN
  10968.  76,Overview,
  10969.         4     FOR i IN 1..10 LOOP
  10970.  77,Overview,
  10971.         5        IF TRUNC(i / 2) = i / 2 THEN    --i is even
  10972.  78,Overview,
  10973.         6          INSERT INTO temp VALUES (i, x, 'i is even');
  10974.  79,Overview,
  10975.         7          ELSE
  10976.  80,Overview,
  10977.         8             INSERT INTO temp VALUES (i, x, 'i is odd');
  10978.  81,Overview,
  10979.         9          END IF;
  10980.  82,Overview,
  10981.        10          x := x + 100;
  10982.  83,Overview,
  10983.        11     END LOOP;
  10984.  84,Overview,
  10985.        12  END;
  10986.  85,Overview,
  10987.        13  .
  10988.  86,Overview,
  10989.  
  10990.  87,Overview,
  10991.      SQL> PL/SQL procedure successfully completed.
  10992.  88,Overview,
  10993.  
  10994.  89,Overview,
  10995.            When you run a block, SQL commands within the block may behave
  10996.  90,Overview,
  10997.            somewhat differently than they would outside of the block.
  10998.  91,Overview,
  10999.  
  11000.  92,Overview,
  11001.  
  11002.  93,Overview,
  11003.  Running SQL*Plus Commands
  11004.  94,Overview,
  11005.  
  11006.  95,Overview,
  11007.  Use SQL*Plus commands to manipulate SQL commands and PL/SQL blocks, and
  11008.  96,Overview,
  11009.  format and print query results.  To speed up command entry, you can
  11010.  97,Overview,
  11011.  abbreviate many SQL*Plus commands to one or a few letters.
  11012.  98,Overview,
  11013.  
  11014.  99,Overview,
  11015.  
  11016. 100,Overview,
  11017.  Running Host Operating System Commands
  11018. 101,Overview,
  11019.  
  11020. 102,Overview,
  11021.  You can execute a host operating system command from the SQL*Plus command
  11022. 103,Overview,
  11023.  prompt, useful when you want to perform a task like listing host operating
  11024. 104,Overview,
  11025.  system files.  To run a host operating system command, enter HOST followed
  11026. 105,Overview,
  11027.  by the host operating system command.  For example, this SQL*Plus command
  11028. 106,Overview,
  11029.  runs a host command, DIRECTORY *.SQL:
  11030. 107,Overview,
  11031.  
  11032. 108,Overview,
  11033.                SQL> HOST DIRECTORY *.SQL
  11034. 109,Overview,
  11035.  
  11036. 110,Overview,
  11037.  See also:  commands, menu.
  11038.   1,PAUSE,
  11039.  
  11040.   2,PAUSE,
  11041.  
  11042.   3,PAUSE,
  11043.                                    PAUSE
  11044.   4,PAUSE,
  11045.  
  11046.   5,PAUSE,
  11047.  PAU[SE] [ text ]
  11048.   6,PAUSE,
  11049.  
  11050.   7,PAUSE,
  11051.  PAUSE displays an empty line followed by a line with text, then waits for
  11052.   8,PAUSE,
  11053.  the user to press RETURN.  Or it displays two empty lines, and waits for
  11054.   9,PAUSE,
  11055.  the user's response.
  11056.  10,PAUSE,
  11057.  
  11058.  11,PAUSE,
  11059.      text
  11060.  12,PAUSE,
  11061.          is the text you wish to display.  Enter PAUSE with no text to
  11062.  13,PAUSE,
  11063.          display two empty lines.
  11064.  14,PAUSE,
  11065.  
  11066.  15,PAUSE,
  11067.  
  11068.  16,PAUSE,
  11069.  Since PAUSE waits for the user's response, it's wise to include a message
  11070.  17,PAUSE,
  11071.  to press RETURN.  PAUSE reads input from the terminal (if available) even
  11072.  18,PAUSE,
  11073.  when you specify a file as the source of the input.  The SET command's
  11074.  19,PAUSE,
  11075.  PAUSE clause controls pausing between pages of a report.
  11076.  20,PAUSE,
  11077.  
  11078.  21,PAUSE,
  11079.  
  11080.  22,PAUSE,
  11081.  Example:  To display "Adjust paper and press RETURN to continue." then
  11082.  23,PAUSE,
  11083.            wait for the user to press RETURN, include the following PAUSE
  11084.  24,PAUSE,
  11085.            command in a command file:
  11086.  25,PAUSE,
  11087.  
  11088.  26,PAUSE,
  11089.                SQL> GET MYFILE
  11090.  27,PAUSE,
  11091.                  1  SET PAUSE ON
  11092.  28,PAUSE,
  11093.                  2  PAUSE Adjust paper and press RETURN to continue.
  11094.  29,PAUSE,
  11095.                  3  SELECT ...
  11096.  30,PAUSE,
  11097.  
  11098.  31,PAUSE,
  11099.  
  11100.  32,PAUSE,
  11101.  See also: /, @, get, prompt, run, set (pause), start, commands, menu.
  11102.   1,PL/SQL Exceptions,
  11103.  
  11104.   2,PL/SQL Exceptions,
  11105.  
  11106.   3,PL/SQL Exceptions,
  11107.                                 PL/SQL Exceptions
  11108.   4,PL/SQL Exceptions,
  11109.  
  11110.   5,PL/SQL Exceptions,
  11111.   Predefined         SQLCODE   ORACLE
  11112.   6,PL/SQL Exceptions,
  11113.   PL/SQL Exception   Returns   ErrorCode   Exception Raised When
  11114.   7,PL/SQL Exceptions,
  11115.  ----------------------------------------------------------------------------
  11116.   8,PL/SQL Exceptions,
  11117.   DUP_VAL_ON_INDEX     -1      ORA-00001   INSERT/UPDATE tried to create two
  11118.   9,PL/SQL Exceptions,
  11119.                                            rows w/ dup values in UNIQUE cols
  11120.  10,PL/SQL Exceptions,
  11121.   INVALID_CURSOR       -1001   ORA-01001   Stmt specified an invalid cursor
  11122.  11,PL/SQL Exceptions,
  11123.   INVALID_NUMBER       -1722   ORA-01722   CHAR to NUMBER failed: not number
  11124.  12,PL/SQL Exceptions,
  11125.   LOGIN_DENIED         -1017   ORA-01017   Invalid username/password used
  11126.  13,PL/SQL Exceptions,
  11127.   NO_DATA_FOUND        +100    ORA-01403   SELECT returned zero rows
  11128.  14,PL/SQL Exceptions,
  11129.   NOT_LOGGED_ON        -1012   ORA-01012   ORACLE call without ORACLE logon
  11130.  15,PL/SQL Exceptions,
  11131.   PROGRAM_ERROR        -6501   ORA-06501   PL/SQL had an internal problem
  11132.  16,PL/SQL Exceptions,
  11133.   STORAGE_ERROR        -6500   ORA-06500   PL/SQL memory full or corrupted
  11134.  17,PL/SQL Exceptions,
  11135.   TIMEOUT_ON_RESOURCE  -51     ORA-00051   Resource not available in time
  11136.  18,PL/SQL Exceptions,
  11137.   TOO_MANY_ROWS        -1427   ORA-01427   SELECT returned more than one row
  11138.  19,PL/SQL Exceptions,
  11139.   VALUE_ERROR          -6502   ORA-06502   Arith/num/string/conversion error
  11140.  20,PL/SQL Exceptions,
  11141.   ZERO_DIVIDE          -1476   ORA-01476   Attempted to divide a number by 0
  11142.  21,PL/SQL Exceptions,
  11143.  
  11144.  22,PL/SQL Exceptions,
  11145.  
  11146.  23,PL/SQL Exceptions,
  11147.  See also: exception, error reporting (functions), insert, update, char,
  11148.  24,PL/SQL Exceptions,
  11149.            number, user id, select, error handling, menu.
  11150.   1,PRAGMA EXCEPTION_INIT,
  11151.  
  11152.   2,PRAGMA EXCEPTION_INIT,
  11153.  
  11154.   3,PRAGMA EXCEPTION_INIT,
  11155.                        PRAGMA EXCEPTION_INIT
  11156.   4,PRAGMA EXCEPTION_INIT,
  11157.                                                PL/SQL statement
  11158.   5,PRAGMA EXCEPTION_INIT,
  11159.  
  11160.   6,PRAGMA EXCEPTION_INIT,
  11161.  PRAGMA EXCEPTION_INIT(exception_name, error_code_number);
  11162.   7,PRAGMA EXCEPTION_INIT,
  11163.  
  11164.   8,PRAGMA EXCEPTION_INIT,
  11165.  
  11166.   9,PRAGMA EXCEPTION_INIT,
  11167.  PRAGMA EXCEPTION_INIT enables you to assign a name to the error
  11168.  10,PRAGMA EXCEPTION_INIT,
  11169.  code of an internal exception that has not been named by ORACLE.
  11170.  11,PRAGMA EXCEPTION_INIT,
  11171.  
  11172.  12,PRAGMA EXCEPTION_INIT,
  11173.  The exception_name must be listed in the DECLARE section of the
  11174.  13,PRAGMA EXCEPTION_INIT,
  11175.  current block or an enclosing block.  Assign one exception_name
  11176.  14,PRAGMA EXCEPTION_INIT,
  11177.  only to a particular error code.
  11178.  15,PRAGMA EXCEPTION_INIT,
  11179.  
  11180.  16,PRAGMA EXCEPTION_INIT,
  11181.  Error_code_numbers are those returned by the SQLCODE function.
  11182.  17,PRAGMA EXCEPTION_INIT,
  11183.  
  11184.  18,PRAGMA EXCEPTION_INIT,
  11185.  The keyword PRAGMA conveys the statement to the PL/SQL compiler;
  11186.  19,PRAGMA EXCEPTION_INIT,
  11187.  the statement is not processed when the block is executed.
  11188.  20,PRAGMA EXCEPTION_INIT,
  11189.  
  11190.  21,PRAGMA EXCEPTION_INIT,
  11191.  
  11192.  22,PRAGMA EXCEPTION_INIT,
  11193.  See also: error handling, declare, exception, pl/sql exceptions,
  11194.  23,PRAGMA EXCEPTION_INIT,
  11195.            error reporting (functions), commands, menu.
  11196.   1,PROMPT,
  11197.  
  11198.   2,PROMPT,
  11199.  
  11200.   3,PROMPT,
  11201.                                    PROMPT
  11202.   4,PROMPT,
  11203.  
  11204.   5,PROMPT,
  11205.  PROMPT [ text ]
  11206.   6,PROMPT,
  11207.  
  11208.   7,PROMPT,
  11209.  PROMPT sends the specified message or a blank line to the user's screen.
  11210.   8,PROMPT,
  11211.  
  11212.   9,PROMPT,
  11213.      text
  11214.  10,PROMPT,
  11215.          is the text of the message you wish to display. If you omit text,
  11216.  11,PROMPT,
  11217.          PROMPT displays a blank line on the user's screen.
  11218.  12,PROMPT,
  11219.  
  11220.  13,PROMPT,
  11221.  Use this command in command files to give information to the user.
  11222.  14,PROMPT,
  11223.  
  11224.  15,PROMPT,
  11225.  Example:  Here is PROMPT used with ACCEPT in command file ASKFORDEPT:
  11226.  16,PROMPT,
  11227.  
  11228.  17,PROMPT,
  11229.                SQL> GET ASKFORDEPT
  11230.  18,PROMPT,
  11231.                  1  PROMPT
  11232.  19,PROMPT,
  11233.                  2  PROMPT Please enter a department
  11234.  20,PROMPT,
  11235.                  3  PROMPT For example: 10, 20, 30, 40
  11236.  21,PROMPT,
  11237.                  4  ACCEPT NEWDEPT NUMBER PROMPT 'DEPT:>'
  11238.  22,PROMPT,
  11239.                  5* SELECT DNAME FROM DEPT WHERE DEPTNO = &NEWDEPT
  11240.  23,PROMPT,
  11241.  
  11242.  24,PROMPT,
  11243.            If you run the file using @ASKFORDEPT, SQL*Plus displays:
  11244.  25,PROMPT,
  11245.  
  11246.  26,PROMPT,
  11247.                Please enter a department
  11248.  27,PROMPT,
  11249.                For example: 10, 20, 30, 40
  11250.  28,PROMPT,
  11251.                DEPT:>
  11252.  29,PROMPT,
  11253.  
  11254.  30,PROMPT,
  11255.            You can then enter a department number at the DEPT:> prompt.
  11256.  31,PROMPT,
  11257.            SQL*Plus lists the line containing &NEWDEPT before and after
  11258.  32,PROMPT,
  11259.            substitution, and then displays the department name matching
  11260.  33,PROMPT,
  11261.            the number entered at the DEPT:> prompt.
  11262.  34,PROMPT,
  11263.  
  11264.  35,PROMPT,
  11265.  
  11266.  36,PROMPT,
  11267.  See also: /, @, accept, get, input, pause, run, start, commands, menu.
  11268.   1,Parameters,
  11269.  
  11270.   2,Parameters,
  11271.  
  11272.   3,Parameters,
  11273.                                Parameters
  11274.   4,Parameters,
  11275.  
  11276.   5,Parameters,
  11277.  A parameter is a substitution variable with & (ampersand) followed by a
  11278.   6,Parameters,
  11279.  number (for example, "&1").  Parameters are used only in command files.
  11280.   7,Parameters,
  11281.  You pass values to the parameters as arguments to the START command.  If a
  11282.   8,Parameters,
  11283.  parameter represents a char or date value, enclose the parameter in
  11284.   9,Parameters,
  11285.  apostrophes as if it were a constant:
  11286.  10,Parameters,
  11287.  
  11288.  11,Parameters,
  11289.                SELECT * FROM EMP
  11290.  12,Parameters,
  11291.                WHERE JOB='&1'  /*char value*/
  11292.  13,Parameters,
  11293.                AND SAL=&2;     /*number value*/
  11294.  14,Parameters,
  11295.  
  11296.  15,Parameters,
  11297.  Then, when you run the command file, enter parameter values as arguments
  11298.  16,Parameters,
  11299.  of the START command.   The first argument after the file name represents
  11300.  17,Parameters,
  11301.  the first parameter (&1), the second represents the second parameter (&2),
  11302.  18,Parameters,
  11303.  and so on.  In the following command, SQL*Plus substitutes CLERK for &1
  11304.  19,Parameters,
  11305.  and 7900 for &2:
  11306.  20,Parameters,
  11307.  
  11308.  21,Parameters,
  11309.                SQL> START MYFILE CLERK 7900
  11310.  22,Parameters,
  11311.  
  11312.  23,Parameters,
  11313.  When you use arguments with the START command, SQL*Plus DEFINEs each
  11314.  24,Parameters,
  11315.  parameter in the command file with the value of the appropriate argument.
  11316.  25,Parameters,
  11317.  
  11318.  26,Parameters,
  11319.  See also: substitution, restrictions, commands, menu.
  11320.   1,Pseudo-Columns,
  11321.  
  11322.   2,Pseudo-Columns,
  11323.  
  11324.   3,Pseudo-Columns,
  11325.                            Pseudo-Columns
  11326.   4,Pseudo-Columns,
  11327.  
  11328.   5,Pseudo-Columns,
  11329.  A pseudo-column in SQL acts like a column, but doesn't reside in a
  11330.   6,Pseudo-Columns,
  11331.  table.  Queries can access data in a pseudo-column, but you cannot
  11332.   7,Pseudo-Columns,
  11333.  INSERT, UPDATE, or DELETE a pseudo-column.
  11334.   8,Pseudo-Columns,
  11335.  
  11336.   9,Pseudo-Columns,
  11337.  Pseudo-Column      Returns
  11338.  10,Pseudo-Columns,
  11339.  ---------------------------------------------------------------------
  11340.  11,Pseudo-Columns,
  11341.  sequence.NEXTVAL   the next value in the sequence
  11342.  12,Pseudo-Columns,
  11343.  
  11344.  13,Pseudo-Columns,
  11345.  sequence.CURRVAL   the current value in the sequence
  11346.  14,Pseudo-Columns,
  11347.  
  11348.  15,Pseudo-Columns,
  11349.  ROWID              a row's unique identifier
  11350.  16,Pseudo-Columns,
  11351.  
  11352.  17,Pseudo-Columns,
  11353.  ROWNUM             the numeric order in which a row was selected
  11354.  18,Pseudo-Columns,
  11355.                     from a table or from a set of joined rows
  11356.  19,Pseudo-Columns,
  11357.  
  11358.  20,Pseudo-Columns,
  11359.  LEVEL              1= root, 2= root's child, 3= grandchild, etc.
  11360.  21,Pseudo-Columns,
  11361.  
  11362.  22,Pseudo-Columns,
  11363.  
  11364.  23,Pseudo-Columns,
  11365.  See also: query, nextval, example nextval, tree-structured query,
  11366.  24,Pseudo-Columns,
  11367.            sequences, menu.
  11368.   1,QUIT,
  11369.  
  11370.   2,QUIT,
  11371.  
  11372.   3,QUIT,
  11373.                                    QUIT
  11374.   4,QUIT,
  11375.  
  11376.   5,QUIT,
  11377.  {QUIT | EXIT} [SUCCESS | FAILURE | WARNING | n | variable]
  11378.   6,QUIT,
  11379.  
  11380.   7,QUIT,
  11381.  QUIT commits all pending database changes, leaves SQL*Plus, and returns
  11382.   8,QUIT,
  11383.  control to the operating system.
  11384.   9,QUIT,
  11385.  
  11386.  10,QUIT,
  11387.      QUIT or EXIT
  11388.  11,QUIT,
  11389.          can be used interchangeably.
  11390.  12,QUIT,
  11391.  
  11392.  13,QUIT,
  11393.      SUCCESS
  11394.  14,QUIT,
  11395.          exits normally.
  11396.  15,QUIT,
  11397.  
  11398.  16,QUIT,
  11399.      FAILURE
  11400.  17,QUIT,
  11401.          exits with a return code indicating failure.
  11402.  18,QUIT,
  11403.  
  11404.  19,QUIT,
  11405.      WARNING
  11406.  20,QUIT,
  11407.          exits with a return code indicating warning.  QUIT with no clauses
  11408.  21,QUIT,
  11409.          exits with a value of SUCCESS.
  11410.  22,QUIT,
  11411.  
  11412.  23,QUIT,
  11413.      n   is an integer you can specify as the return code.
  11414.  24,QUIT,
  11415.  
  11416.  25,QUIT,
  11417.      variable
  11418.  26,QUIT,
  11419.          is a user-defined or system variable, like SQL.SQLCODE.
  11420.  27,QUIT,
  11421.          QUIT variable exits with the value of variable as the return code.
  11422.  28,QUIT,
  11423.  
  11424.  29,QUIT,
  11425.  QUIT enables you to specify an operating system return code so you can run
  11426.  30,QUIT,
  11427.  SQL*Plus command files in batch mode and detect an unexpected event.  The
  11428.  31,QUIT,
  11429.  manner of detection is operating-system specific.  SUCCESS, WARNING, and
  11430.  32,QUIT,
  11431.  FAILURE represent operating system dependent values; on some systems,
  11432.  33,QUIT,
  11433.  WARNING and FAILURE are not distinguishable.  To QUIT conditionally, use
  11434.  34,QUIT,
  11435.  WHENEVER SQLERROR.
  11436.  35,QUIT,
  11437.  
  11438.  36,QUIT,
  11439.  
  11440.  37,QUIT,
  11441.  Example:  The following returns the error code of the last executed SQL
  11442.  38,QUIT,
  11443.            command or PL/SQL block:
  11444.  39,QUIT,
  11445.  
  11446.  40,QUIT,
  11447.                SQL> QUIT SQL.SQLCODE
  11448.  41,QUIT,
  11449.  
  11450.  42,QUIT,
  11451.            The location of the return code depends on your system.
  11452.  43,QUIT,
  11453.  
  11454.  44,QUIT,
  11455.  
  11456.  45,QUIT,
  11457.  See also: connect, disconnect, host, save, spool, SQLPlus,
  11458.  46,QUIT,
  11459.            whenever sqlerror, commands, menu.
  11460.   1,Query,
  11461.  
  11462.   2,Query,
  11463.  
  11464.   3,Query,
  11465.                                 Query
  11466.   4,Query,
  11467.  
  11468.   5,Query,
  11469.  A query is a SQL instruction to retrieve data from one or more tables
  11470.   6,Query,
  11471.  or views.  A subquery is a query within another statement.
  11472.   7,Query,
  11473.  
  11474.   8,Query,
  11475.  Use queries to:
  11476.   9,Query,
  11477.  
  11478.  10,Query,
  11479.          -  Define the set of rows in the target table with COPY,
  11480.  11,Query,
  11481.             INSERT, or CREATE TABLE.
  11482.  12,Query,
  11483.  
  11484.  13,Query,
  11485.          -  Obtain values for comparison in WHERE, HAVING, and
  11486.  14,Query,
  11487.             START WITH clauses within SELECT, UPDATE, and DELETE
  11488.  15,Query,
  11489.             statements.
  11490.  16,Query,
  11491.  
  11492.  17,Query,
  11493.                       SELECT...WHERE expr oper query
  11494.  18,Query,
  11495.                             ...HAVING expr oper query
  11496.  19,Query,
  11497.                             ...START WITH expr oper query
  11498.  20,Query,
  11499.  
  11500.  21,Query,
  11501.                       UPDATE...SET(column, column,..) oper query
  11502.  22,Query,
  11503.                             ...WHERE expr oper query
  11504.  23,Query,
  11505.  
  11506.  24,Query,
  11507.                       DELETE...WHERE expr oper query
  11508.  25,Query,
  11509.  
  11510.  26,Query,
  11511.                       INSERT...query
  11512.  27,Query,
  11513.  
  11514.  28,Query,
  11515.  
  11516.  29,Query,
  11517.  See also: example query, subquery, select, update, delete, where,
  11518.  30,Query,
  11519.            create table, uses of select, commands, menu.
  11520.   1,RAISE,
  11521.  
  11522.   2,RAISE,
  11523.                               RAISE
  11524.   3,RAISE,
  11525.                                                     PL/SQL statement
  11526.   4,RAISE,
  11527.  RAISE(exception_name);
  11528.   5,RAISE,
  11529.  
  11530.   6,RAISE,
  11531.  RAISE;
  11532.   7,RAISE,
  11533.  
  11534.   8,RAISE,
  11535.  
  11536.   9,RAISE,
  11537.  RAISE stops execution of the PL/SQL block and transfers control to
  11538.  10,RAISE,
  11539.  the exception handler declared for exception_name.
  11540.  11,RAISE,
  11541.  
  11542.  12,RAISE,
  11543.  Use RAISE only within an exception handler to re-raise the current
  11544.  13,RAISE,
  11545.  exception and look for its handler in the enclosing blocks.
  11546.  14,RAISE,
  11547.  
  11548.  15,RAISE,
  11549.  If PL/SQL finds no handler for exception_name in the current block,
  11550.  16,RAISE,
  11551.  the exception is passed to the enclosing blocks until it's handler
  11552.  17,RAISE,
  11553.  is found.  If there is no matching exception handler, an unhandled
  11554.  18,RAISE,
  11555.  exception error occurs, and execution stops.
  11556.  19,RAISE,
  11557.  
  11558.  20,RAISE,
  11559.  
  11560.  21,RAISE,
  11561.  See also: declare, error handling, exception, blocks, commands, menu.
  11562.   1,RAW,
  11563.  
  11564.   2,RAW,
  11565.  
  11566.   3,RAW,
  11567.                                 RAW
  11568.   4,RAW,
  11569.  
  11570.   5,RAW,
  11571.  RAW(size)
  11572.   6,RAW,
  11573.  
  11574.   7,RAW,
  11575.  Use the RAW datatype in SQL to store byte-oriented data:  character
  11576.   8,RAW,
  11577.  strings and graphics character sequences.  ORACLE displays RAW data
  11578.   9,RAW,
  11579.  as hexidecimal character values.
  11580.  10,RAW,
  11581.  
  11582.  11,RAW,
  11583.  The maximum RAW size is 255 bytes. RAW is like CHAR, except when
  11584.  12,RAW,
  11585.  transmitted via SQL*Net, which converts ASCII representations to
  11586.  13,RAW,
  11587.  EBCDIC, and EBCDIC representations to ASCII.  The size parameter
  11588.  14,RAW,
  11589.  is optional; if omitted, it defaults to 1.
  11590.  15,RAW,
  11591.  
  11592.  16,RAW,
  11593.  
  11594.  17,RAW,
  11595.  See also: long, long raw, raw, char, date, number, boolean, connect,
  11596.  18,RAW,
  11597.            menu.
  11598.   1,REMARK,
  11599.  
  11600.   2,REMARK,
  11601.  
  11602.   3,REMARK,
  11603.                                    REMARK
  11604.   4,REMARK,
  11605.  
  11606.   5,REMARK,
  11607.  REM[ARK]
  11608.   6,REMARK,
  11609.  
  11610.   7,REMARK,
  11611.  REMARK at the beginning of a line signifies a comment in a command file.
  11612.   8,REMARK,
  11613.  The comment ends at the end of the line.  A line cannot contain both a
  11614.   9,REMARK,
  11615.  comment and a command.  See /* for information on entering comments in
  11616.  10,REMARK,
  11617.  statements.
  11618.  11,REMARK,
  11619.  
  11620.  12,REMARK,
  11621.  Example:  Here are some typical comments in command files:
  11622.  13,REMARK,
  11623.  
  11624.  14,REMARK,
  11625.                SQL> GET EMPSUM
  11626.  15,REMARK,
  11627.  
  11628.  16,REMARK,
  11629.                1  REM Uses BREAK ON REPORT to break on end of table.
  11630.  17,REMARK,
  11631.                2  BREAK ON REPORT
  11632.  18,REMARK,
  11633.                3  COMPUTE SUM OF "DEPARTMENT 10" "DEPARTMENT 20" -
  11634.  19,REMARK,
  11635.                4  "DEPARTMENT 30" "TOTAL BY JOB" ON REPORT
  11636.  20,REMARK,
  11637.                5  REM Each column displays the sums of salaries by job
  11638.  21,REMARK,
  11639.                6  REM for one of the departments 10, 20, 30.
  11640.  22,REMARK,
  11641.                7  SELECT JOB,
  11642.  23,REMARK,
  11643.                8         SUM( DECODE( DEPTNO, 10, SAL, 0)) "DEPARTMENT 10",
  11644.  24,REMARK,
  11645.                9         SUM( DECODE( DEPTNO, 20, SAL, 0)) "DEPARTMENT 20",
  11646.  25,REMARK,
  11647.                10        SUM( DECODE( DEPTNO, 30, SAL, 0)) "DEPARTMENT 30",
  11648.  26,REMARK,
  11649.                11        SUM(SAL) "TOTAL BY JOB"
  11650.  27,REMARK,
  11651.                12  FROM EMP
  11652.  28,REMARK,
  11653.                13* GROUP BY JOB
  11654.  29,REMARK,
  11655.  
  11656.  30,REMARK,
  11657.  
  11658.  31,REMARK,
  11659.  See also: /, @, comments, edit, get, start, run, whenever sqlerror,
  11660.  32,REMARK,
  11661.            commands, menu.
  11662.   1,RENAME,
  11663.  
  11664.   2,RENAME,
  11665.                                  RENAME
  11666.   3,RENAME,
  11667.                                                              SQL statement
  11668.   4,RENAME,
  11669.  RENAME old TO new
  11670.   5,RENAME,
  11671.  
  11672.   6,RENAME,
  11673.  RENAME changes the name of a table, view, or synonym from old to new.
  11674.   7,RENAME,
  11675.  Grants and indexes belonging to the old object are transferred to the
  11676.   8,RENAME,
  11677.  new one.
  11678.   9,RENAME,
  11679.  
  11680.  10,RENAME,
  11681.  Columns cannot be renamed with RENAME; use CREATE TABLE...AS SELECT
  11682.  11,RENAME,
  11683.  instead.  For example, rename column oldcol to newcol in table static
  11684.  12,RENAME,
  11685.  (with one column) by entering:
  11686.  13,RENAME,
  11687.  
  11688.  14,RENAME,
  11689.      CREATE TABLE temporary (newcol) AS SELECT (oldcol) FROM static
  11690.  15,RENAME,
  11691.      DROP TABLE static
  11692.  16,RENAME,
  11693.      RENAME temporary TO static
  11694.  17,RENAME,
  11695.  
  11696.  18,RENAME,
  11697.  
  11698.  19,RENAME,
  11699.  See also: create synonym, create table, create view, identifiers, tables,
  11700.  20,RENAME,
  11701.            views, synonyms, commands, menu.
  11702.   1,REVOKE,
  11703.  
  11704.   2,REVOKE,
  11705.  
  11706.   3,REVOKE,
  11707.                                  REVOKE
  11708.   4,REVOKE,
  11709.                                                             SQL statement
  11710.   5,REVOKE,
  11711.  There are three ways to use REVOKE:  1) to remove database privileges
  11712.   6,REVOKE,
  11713.  from one or more users; 2) to remove the ability of one or more users
  11714.   7,REVOKE,
  11715.  to create objects in the specified tablespace (and prevents allocation
  11716.   8,REVOKE,
  11717.  of more database space to those users' objects); and 3) to remove access
  11718.   9,REVOKE,
  11719.  privileges for one or more users to tables, views, and sequences.
  11720.  10,REVOKE,
  11721.  
  11722.  11,REVOKE,
  11723.  
  11724.  12,REVOKE,
  11725.  *First Method*
  11726.  13,REVOKE,
  11727.  
  11728.  14,REVOKE,
  11729.  REVOKE CONNECT, RESOURCE, DBA
  11730.  15,REVOKE,
  11731.      FROM user, user,...
  11732.  16,REVOKE,
  11733.  
  11734.  17,REVOKE,
  11735.  This type of REVOKE removes database privileges from one or more users.
  11736.  18,REVOKE,
  11737.  Before revoking CONNECT from a user, we recommend that all objects
  11738.  19,REVOKE,
  11739.  owned by that user be dropped first.  REVOKE requires DBA privileges.
  11740.  20,REVOKE,
  11741.  
  11742.  21,REVOKE,
  11743.  *Second Method*
  11744.  22,REVOKE,
  11745.  
  11746.  23,REVOKE,
  11747.  REVOKE RESOURCE ON tablespace
  11748.  24,REVOKE,
  11749.      FROM user, user,...
  11750.  25,REVOKE,
  11751.  
  11752.  26,REVOKE,
  11753.  This type of REVOKE removes the ability of one or more users to create
  11754.  27,REVOKE,
  11755.  objects in the specified tablespace, and prevents the allocation of
  11756.  28,REVOKE,
  11757.  further database space to those users' objects.
  11758.  29,REVOKE,
  11759.  
  11760.  30,REVOKE,
  11761.  *Third Method*
  11762.  31,REVOKE,
  11763.  
  11764.  32,REVOKE,
  11765.  REVOKE object_privilege, object_privilege,... | ALL
  11766.  33,REVOKE,
  11767.      ON user.object
  11768.  34,REVOKE,
  11769.      FROM PUBLIC | user, user,...
  11770.  35,REVOKE,
  11771.  
  11772.  36,REVOKE,
  11773.  This type of REVOKE removes access privileges for one or more users to
  11774.  37,REVOKE,
  11775.  tables, views, and sequences.  You must own the object, or have been
  11776.  38,REVOKE,
  11777.  granted WITH GRANT OPTION on the table.
  11778.  39,REVOKE,
  11779.  
  11780.  40,REVOKE,
  11781.  If a user is authorized to access a table by more than one person, he/she
  11782.  41,REVOKE,
  11783.  may use the table until privileges are revoked by all who granted them.
  11784.  42,REVOKE,
  11785.  
  11786.  43,REVOKE,
  11787.      object_privilege
  11788.  44,REVOKE,
  11789.          for tables:    ALTER, DELETE, INDEX, INSERT, REFERENCES, SELECT,
  11790.  45,REVOKE,
  11791.                         or UPDATE
  11792.  46,REVOKE,
  11793.  
  11794.  47,REVOKE,
  11795.          for views:     DELETE, INSERT, SELECT, or UPDATE
  11796.  48,REVOKE,
  11797.  
  11798.  49,REVOKE,
  11799.          for sequences: ALTER or SELECT
  11800.  50,REVOKE,
  11801.  
  11802.  51,REVOKE,
  11803.  
  11804.  52,REVOKE,
  11805.  See also: audit, grant, dba, commands, menu.
  11806.   1,ROLLBACK,
  11807.  
  11808.   2,ROLLBACK,
  11809.  
  11810.   3,ROLLBACK,
  11811.                                  ROLLBACK
  11812.   4,ROLLBACK,
  11813.                                                      SQL statement
  11814.   5,ROLLBACK,
  11815.  ROLLBACK WORK;
  11816.   6,ROLLBACK,
  11817.  
  11818.   7,ROLLBACK,
  11819.  ROLLBACK TO SAVEPOINT savepoint_name;
  11820.   8,ROLLBACK,
  11821.  
  11822.   9,ROLLBACK,
  11823.  ROLLBACK discards all database changes made since the last COMMIT
  11824.  10,ROLLBACK,
  11825.  statement, and erases all savepoints.
  11826.  11,ROLLBACK,
  11827.  
  11828.  12,ROLLBACK,
  11829.  ROLLBACK TO savepoint_name undoes all database changes made since
  11830.  13,ROLLBACK,
  11831.  the last SAVEPOINT statement with that name.
  11832.  14,ROLLBACK,
  11833.  
  11834.  15,ROLLBACK,
  11835.  ORACLE creates an implicit savepoint before an INSERT, UPDATE, or
  11836.  16,ROLLBACK,
  11837.  DELETE statement is executed, and automatically issues a ROLLBACK
  11838.  17,ROLLBACK,
  11839.  to that point if the statement fails.
  11840.  18,ROLLBACK,
  11841.  
  11842.  19,ROLLBACK,
  11843.  WORK and SAVEPOINT are optional; use them to make reading easier.
  11844.  20,ROLLBACK,
  11845.  
  11846.  21,ROLLBACK,
  11847.  
  11848.  22,ROLLBACK,
  11849.  See also: example rollback, commit, savepoint, insert, update,
  11850.  23,ROLLBACK,
  11851.            delete, commands, menu.
  11852.   1,RUN,
  11853.  
  11854.   2,RUN,
  11855.  
  11856.   3,RUN,
  11857.                                   RUN
  11858.   4,RUN,
  11859.  
  11860.   5,RUN,
  11861.  R[UN]
  11862.   6,RUN,
  11863.  
  11864.   7,RUN,
  11865.  RUN lists and executes the SQL command or PL/SQL block currently in the
  11866.   8,RUN,
  11867.  SQL buffer.  RUN makes the last line of the SQL buffer the current line.
  11868.   9,RUN,
  11869.  The slash command (/) works like RUN, but doesn't list the command.
  11870.  10,RUN,
  11871.  
  11872.  11,RUN,
  11873.     Example:  The SQL buffer contains the query:
  11874.  12,RUN,
  11875.  
  11876.  13,RUN,
  11877.                SELECT DEPTNO FROM DEPT
  11878.  14,RUN,
  11879.  
  11880.  15,RUN,
  11881.            To RUN the query, enter:
  11882.  16,RUN,
  11883.  
  11884.  17,RUN,
  11885.                SQL> RUN
  11886.  18,RUN,
  11887.  
  11888.  19,RUN,
  11889.            Output:  1* SELECT DEPTNO FROM DEPT
  11890.  20,RUN,
  11891.  
  11892.  21,RUN,
  11893.                     DEPTNO
  11894.  22,RUN,
  11895.                     ------
  11896.  23,RUN,
  11897.                         10
  11898.  24,RUN,
  11899.                         20
  11900.  25,RUN,
  11901.                         30
  11902.  26,RUN,
  11903.                         40
  11904.  27,RUN,
  11905.  
  11906.  28,RUN,
  11907.  
  11908.  29,RUN,
  11909.  See also: /, @, edit, get, list, parameters, save, spool, start,
  11910.  30,RUN,
  11911.            SQL in PL/SQL, commands, menu.
  11912.   1,RUNFORM,
  11913.  
  11914.   2,RUNFORM,
  11915.  
  11916.   3,RUNFORM,
  11917.                                    RUNFORM
  11918.   4,RUNFORM,
  11919.  
  11920.   5,RUNFORM,
  11921.  RUNFORM [options]  form_name
  11922.   6,RUNFORM,
  11923.  
  11924.   7,RUNFORM,
  11925.  RUNFORM invokes a SQL*Forms application from within SQL*Plus.  Note: You
  11926.   8,RUNFORM,
  11927.  have access to this command only if your site chose this option while
  11928.   9,RUNFORM,
  11929.  installing SQL*Plus.
  11930.  10,RUNFORM,
  11931.  
  11932.  11,RUNFORM,
  11933.      [options]
  11934.  12,RUNFORM,
  11935.          See your SQL*Forms Designer's Reference Manual for details.
  11936.  13,RUNFORM,
  11937.  
  11938.  14,RUNFORM,
  11939.      form_name
  11940.  15,RUNFORM,
  11941.          See your SQL*Forms Designer's Reference Manual for details.
  11942.  16,RUNFORM,
  11943.  
  11944.  17,RUNFORM,
  11945.  The RUNFORM syntax is the same in both SQL*Plus and SQL*Forms.  You can
  11946.  18,RUNFORM,
  11947.  invoke a form more quickly in SQL*Plus than you can from the system prompt
  11948.  19,RUNFORM,
  11949.  because you avoid a separate ORACLE logon.
  11950.  20,RUNFORM,
  11951.  
  11952.  21,RUNFORM,
  11953.  When you invoke a form in SQL*Plus (by using RUNFORM), do not specify a
  11954.  22,RUNFORM,
  11955.  username/password (you retain your current connection to ORACLE).  To use
  11956.  23,RUNFORM,
  11957.  another username/password, use the CONNECT command to connect to the
  11958.  24,RUNFORM,
  11959.  username before issuing the RUNFORM command.
  11960.  25,RUNFORM,
  11961.  
  11962.  26,RUNFORM,
  11963.  
  11964.  27,RUNFORM,
  11965.  Example:  To run a form named MYFORM, enter:
  11966.  28,RUNFORM,
  11967.  
  11968.  29,RUNFORM,
  11969.                SQL> RUNFORM MYFORM
  11970.  30,RUNFORM,
  11971.  
  11972.  31,RUNFORM,
  11973.  
  11974.  32,RUNFORM,
  11975.  See also:  commands, menu.
  11976.   1,Remote Databases,
  11977.  
  11978.   2,Remote Databases,
  11979.  
  11980.   3,Remote Databases,
  11981.                             Remote Databases
  11982.   4,Remote Databases,
  11983.  
  11984.   5,Remote Databases,
  11985.  Many installations run ORACLE on more than one computer.  Such computers
  11986.   6,Remote Databases,
  11987.  are often connected in a network, so programs on different computers can
  11988.   7,Remote Databases,
  11989.  exchange data.  Networked computers can be physically near each other, or
  11990.   8,Remote Databases,
  11991.  separated by large distances and connected by telecommunication links.
  11992.   9,Remote Databases,
  11993.  
  11994.  10,Remote Databases,
  11995.  Remote databases are databases on other computers and on the host computer
  11996.  11,Remote Databases,
  11997.  other than your default database.  You can access a remote database if it
  11998.  12,Remote Databases,
  11999.  has SQL*Net and a network driver compatible with the local database.  You
  12000.  13,Remote Databases,
  12001.  can access a remote database inside SQL*Plus (with the CONNECT command),
  12002.  14,Remote Databases,
  12003.  or as you start SQL*Plus (with the SQLPLUS command).
  12004.  15,Remote Databases,
  12005.  
  12006.  16,Remote Databases,
  12007.  Accessing a Remote Database from within SQL*Plus
  12008.  17,Remote Databases,
  12009.  
  12010.  18,Remote Databases,
  12011.      To access a remote database using CONNECT, include a SQL*Net database
  12012.  19,Remote Databases,
  12013.      specification in the CONNECT command in one of these forms:
  12014.  20,Remote Databases,
  12015.  
  12016.  21,Remote Databases,
  12017.                 CONNECT SCOTT@database_specification
  12018.  22,Remote Databases,
  12019.                 CONNECT SCOTT/TIGER@database_specification
  12020.  23,Remote Databases,
  12021.  
  12022.  24,Remote Databases,
  12023.      SQL*Plus connects you to the database, which is the default until you
  12024.  25,Remote Databases,
  12025.      CONNECT to another one, DISCONNECT, or exit SQL*Plus.  The database
  12026.  26,Remote Databases,
  12027.      specification string depends upon your computer's SQL*Net protocol.
  12028.  27,Remote Databases,
  12029.  
  12030.  28,Remote Databases,
  12031.  Accessing a Remote Database as You Start SQL*Plus
  12032.  29,Remote Databases,
  12033.  
  12034.  30,Remote Databases,
  12035.      To connect to a remote database when you start SQL*Plus, include one
  12036.  31,Remote Databases,
  12037.      of these SQL*Net database specification forms in your SQLPLUS command:
  12038.  32,Remote Databases,
  12039.  
  12040.  33,Remote Databases,
  12041.                SQLPLUS SCOTT@database_specification
  12042.  34,Remote Databases,
  12043.                SQLPLUS SCOTT/TIGER@database_specification
  12044.  35,Remote Databases,
  12045.  
  12046.  36,Remote Databases,
  12047.      The username, password, and database_specification must be valid in
  12048.  37,Remote Databases,
  12049.      the remote database.  SQL*Plus starts and connects you to the remote
  12050.  38,Remote Databases,
  12051.       database, which is the default database until you CONNECT to another
  12052.  39,Remote Databases,
  12053.       database, DISCONNECT, or exit SQL*Plus.
  12054.  40,Remote Databases,
  12055.  
  12056.  41,Remote Databases,
  12057.  See also:  commands, menu.
  12058.   1,Reserved Words,
  12059.  
  12060.   2,Reserved Words,
  12061.  
  12062.   3,Reserved Words,
  12063.                             Reserved Words
  12064.   4,Reserved Words,
  12065.  
  12066.   5,Reserved Words,
  12067.  The following words have special meaning in SQL and PL/SQL, and may
  12068.   6,Reserved Words,
  12069.  not be used for identifier names (unless enclosed in "quotes"):
  12070.   7,Reserved Words,
  12071.  
  12072.   8,Reserved Words,
  12073.  ABORT      AUDIT           CLUSTERS     DATA_BASE      DISPOSE
  12074.   9,Reserved Words,
  12075.  ACCEPT     AUTHORIZATION   COLAUTH      DATE           DISTINCT
  12076.  10,Reserved Words,
  12077.  ACCESS     AVG             COLUMN       DBA            DO
  12078.  11,Reserved Words,
  12079.  ADD        BEGIN           COMMENT      DEBUGOFF       DROP
  12080.  12,Reserved Words,
  12081.  ALL        BETWEEN         COMMIT       DEBUGON        ELSE
  12082.  13,Reserved Words,
  12083.  ALTER      BODY            COMPRESS     DECIMAL        ELSIF
  12084.  14,Reserved Words,
  12085.  AND        BOOLEAN         CONNECT      DECLARE        END
  12086.  15,Reserved Words,
  12087.  ANY        BY              CONSTANT     DEFAULT        ENTRY
  12088.  16,Reserved Words,
  12089.  ARRAY      CASE            COUNT        DEFINITION     EXCEPTION
  12090.  17,Reserved Words,
  12091.  AS         CHAR            CRASH        DELAY          EXCEPTION_INIT
  12092.  18,Reserved Words,
  12093.  ASC        CHAR_BASE       CREATE       DELETE         EXCLUSIVE
  12094.  19,Reserved Words,
  12095.  ASSERT     CHECK           CURRENT      DELTA          EXISTS
  12096.  20,Reserved Words,
  12097.  ASSIGN     CLOSE           CURSOR       DESC           EXIT
  12098.  21,Reserved Words,
  12099.  AT         CLUSTER         DATABASE     DIGITS         FALSE
  12100.  22,Reserved Words,
  12101.  
  12102.  23,Reserved Words,
  12103.  
  12104.  24,Reserved Words,
  12105.  
  12106.  25,Reserved Words,
  12107.  FETCH        IF            LIKE         NOCOMPRESS     OTHERS
  12108.  26,Reserved Words,
  12109.  FILE         IMMEDIATE     LIMITED      NOT            OUT
  12110.  27,Reserved Words,
  12111.  FLOAT        IN            LOCK         NOWAIT         PACKAGE
  12112.  28,Reserved Words,
  12113.  FOR          INCREMENT     LONG         NULL           PARTITION
  12114.  29,Reserved Words,
  12115.  FORM         INDEX         LOOP         NUMBER         PCTFREE
  12116.  30,Reserved Words,
  12117.  FROM         INDEXES       MAX          NUMBER_BASE    PRAGMA
  12118.  31,Reserved Words,
  12119.  FUNCTION     INDICATOR     MAXEXTENTS   OF             PRIOR
  12120.  32,Reserved Words,
  12121.  GENERIC      INITIAL       MIN          OFFLINE        PRIVATE
  12122.  33,Reserved Words,
  12123.  GOTO         INSERT        MINUS        ON             PRIVILEGES
  12124.  34,Reserved Words,
  12125.  GRANT        INTEGER       MOD          ONLINE         PROCEDURE
  12126.  35,Reserved Words,
  12127.  GRAPHIC      INTERSECT     MODE         OPEN           PUBLIC
  12128.  36,Reserved Words,
  12129.  GROUP        INTO          MODIFY       OPTION         RAISE
  12130.  37,Reserved Words,
  12131.  HAVING       IS            NEW          OR             RANGE
  12132.  38,Reserved Words,
  12133.  IDENTIFIED   LEVEL         NOAUDIT      ORDER          RAW
  12134.  39,Reserved Words,
  12135.  
  12136.  40,Reserved Words,
  12137.  
  12138.  41,Reserved Words,
  12139.  
  12140.  42,Reserved Words,
  12141.  RECORD       ROWTYPE       SQLERRM      THEN           VARGRAPH
  12142.  43,Reserved Words,
  12143.  RELEASE      RUN           START        TO             VARIANCE
  12144.  44,Reserved Words,
  12145.  REM          SAVEPOINT     STATEMENT    TRIGGER        VIEW
  12146.  45,Reserved Words,
  12147.  REMARK       SCHEMA        STDDEV       TRUE           VIEWS
  12148.  46,Reserved Words,
  12149.  RENAME       SELECT        SUBTYPE      TYPE           WHEN
  12150.  47,Reserved Words,
  12151.  RESOURCE     SEPARATE      SUCCESSFUL   UID            WHENEVER
  12152.  48,Reserved Words,
  12153.  RETURN       SESSION       SUM          UNION          WHERE
  12154.  49,Reserved Words,
  12155.  REVERSE      SET           SYNONYM      UNIQUE         WHILE
  12156.  50,Reserved Words,
  12157.  REVOKE       SHARE         SYSDATE      UPDATE         WITH
  12158.  51,Reserved Words,
  12159.  ROLLBACK     SIZE          TABAUTH      USE            WORK
  12160.  52,Reserved Words,
  12161.  ROW          SMALLINT      TABLE        USER           XOR
  12162.  53,Reserved Words,
  12163.  ROWID        SPACE         TABLES       VALIDATE
  12164.  54,Reserved Words,
  12165.  ROWNUM       SQL           TASK         VALUES
  12166.  55,Reserved Words,
  12167.  ROWS         SQLCODE       TERMINATE    VARCHAR
  12168.  56,Reserved Words,
  12169.  
  12170.  57,Reserved Words,
  12171.  
  12172.  58,Reserved Words,
  12173.  
  12174.  59,Reserved Words,
  12175.  See also: identifiers, commands, menu.
  12176.   1,SAVE,
  12177.  
  12178.   2,SAVE,
  12179.  
  12180.   3,SAVE,
  12181.                                   SAVE
  12182.   4,SAVE,
  12183.  
  12184.   5,SAVE,
  12185.  SAV[E] file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]
  12186.   6,SAVE,
  12187.  
  12188.   7,SAVE,
  12189.  SAVE stores the buffer's contents in a host operating system command file.
  12190.   8,SAVE,
  12191.  When you SAVE the contents of the SQL buffer, SAVE adds a line containing
  12192.   9,SAVE,
  12193.  a slash (/) to the end of the file.
  12194.  10,SAVE,
  12195.  
  12196.  11,SAVE,
  12197.      file_name[.ext ]
  12198.  12,SAVE,
  12199.          specifies the command file in which to save the buffer's
  12200.  13,SAVE,
  12201.          contents.  If you don't specify an extension, SQL*Plus assumes the
  12202.  14,SAVE,
  12203.          default extension (normally SQL).  For information on changing the
  12204.  15,SAVE,
  12205.          default extension, see the SUFFIX variable of the SET command.
  12206.  16,SAVE,
  12207.  
  12208.  17,SAVE,
  12209.          To SAVE a file under a name identical to a SAVE command clause
  12210.  18,SAVE,
  12211.          (CREATE, REPLACE, or APPEND), you must specify a file extension.
  12212.  19,SAVE,
  12213.  
  12214.  20,SAVE,
  12215.      CRE[ATE]
  12216.  21,SAVE,
  12217.          creates the file if the file does not exist.
  12218.  22,SAVE,
  12219.  
  12220.  23,SAVE,
  12221.      REP[LACE]
  12222.  24,SAVE,
  12223.          replaces the contents of an existing file.  If the file does not
  12224.  25,SAVE,
  12225.          exist, REPLACE creates the file.
  12226.  26,SAVE,
  12227.  
  12228.  27,SAVE,
  12229.      APP[END]
  12230.  28,SAVE,
  12231.          adds the contents of the buffer to the end of the specified file.
  12232.  29,SAVE,
  12233.  
  12234.  30,SAVE,
  12235.  
  12236.  31,SAVE,
  12237.  Example:  To save the buffer's contents in file DEPTSALRPT.SQL, enter:
  12238.  32,SAVE,
  12239.  
  12240.  33,SAVE,
  12241.                SQL> SAVE DEPTSALRPT
  12242.  34,SAVE,
  12243.  
  12244.  35,SAVE,
  12245.  
  12246.  36,SAVE,
  12247.            To save the buffer's contents in file DEPTSALRPT.OLD, enter:
  12248.  37,SAVE,
  12249.  
  12250.  38,SAVE,
  12251.                SQL> SAVE DEPTSALRPT.OLD
  12252.  39,SAVE,
  12253.  
  12254.  40,SAVE,
  12255.  See also:  commands, menu.
  12256.   1,SAVEPOINT,
  12257.  
  12258.   2,SAVEPOINT,
  12259.  
  12260.   3,SAVEPOINT,
  12261.                                SAVEPOINT
  12262.   4,SAVEPOINT,
  12263.                                                     SQL statement
  12264.   5,SAVEPOINT,
  12265.  SAVEPOINT savepoint_name;
  12266.   6,SAVEPOINT,
  12267.  
  12268.   7,SAVEPOINT,
  12269.  SAVEPOINT names the current point in a transaction, so you can
  12270.   8,SAVEPOINT,
  12271.  use a ROLLBACK statement with that same savepoint_name to undo
  12272.   9,SAVEPOINT,
  12273.  any changes made since the SAVEPOINT.
  12274.  10,SAVEPOINT,
  12275.  
  12276.  11,SAVEPOINT,
  12277.    -  If you reuse a savepoint_name within a transaction, the old
  12278.  12,SAVEPOINT,
  12279.       SAVEPOINT with that name is erased.
  12280.  13,SAVEPOINT,
  12281.  
  12282.  14,SAVEPOINT,
  12283.    -  ROLLBACK TO savepoint_name discards transactions made after
  12284.  15,SAVEPOINT,
  12285.       the savepoint_name specified.
  12286.  16,SAVEPOINT,
  12287.  
  12288.  17,SAVEPOINT,
  12289.    -  COMMIT and ROLLBACK without parameter erase all savepoints.
  12290.  18,SAVEPOINT,
  12291.  
  12292.  19,SAVEPOINT,
  12293.  
  12294.  20,SAVEPOINT,
  12295.  See also: example rollback, transactions, rollback, commit, commands,
  12296.  21,SAVEPOINT,
  12297.            menu.
  12298.   1,SELECT,
  12299.  
  12300.   2,SELECT,
  12301.  
  12302.   3,SELECT,
  12303.                                  SELECT
  12304.   4,SELECT,
  12305.                                                            SQL statement
  12306.   5,SELECT,
  12307.  SELECT ALL | DISTINCT * | table.* | expr alias,...
  12308.   6,SELECT,
  12309.     FROM user.table, table alias,...
  12310.   7,SELECT,
  12311.     WHERE condition
  12312.   8,SELECT,
  12313.     CONNECT BY condition  START WITH condition
  12314.   9,SELECT,
  12315.     GROUP BY expr, expr... HAVING condition
  12316.  10,SELECT,
  12317.     UNION | INTERSECT | MINUS  SELECT...
  12318.  11,SELECT,
  12319.     ORDER BY expr | ASC | DESC,...
  12320.  12,SELECT,
  12321.     FOR UPDATE OF column, column... NOWAIT;
  12322.  13,SELECT,
  12323.  
  12324.  14,SELECT,
  12325.  SELECT retrieves rows and columns from one or more tables.  By itself,
  12326.  15,SELECT,
  12327.  a select statement is a query; it is a subquery when it is a clause
  12328.  16,SELECT,
  12329.  in another statement.  FROM is required; all other clauses are optional.
  12330.  17,SELECT,
  12331.  clauses must be in the order shown above when used together.
  12332.  18,SELECT,
  12333.  
  12334.  19,SELECT,
  12335.  For more information, type help, a space, and all or part of a topic.
  12336.  20,SELECT,
  12337.  
  12338.  21,SELECT,
  12339.  See also: bnf syntax, uses of select, query, subquery, from, where,
  12340.  22,SELECT,
  12341.            aliases, connect by, group by, order by, for update of, 
  12342.  23,SELECT,
  12343.            set operators, other operators, expressions, conditions,
  12344.  24,SELECT,
  12345.            example query, example subquery, commands, menu.
  12346.   1,SELECT INTO,
  12347.  
  12348.   2,SELECT INTO,
  12349.                             SELECT INTO
  12350.   3,SELECT INTO,
  12351.                                                   PL/SQL statement
  12352.   4,SELECT INTO,
  12353.  SELECT_list INTO variable_list
  12354.   5,SELECT INTO,
  12355.     FROM table, table,...
  12356.   6,SELECT INTO,
  12357.     rest_of_statement;
  12358.   7,SELECT INTO,
  12359.  
  12360.   8,SELECT INTO,
  12361.  
  12362.   9,SELECT INTO,
  12363.  For each item in the SELECT_list, SELECT...INTO retrieves a value
  12364.  10,SELECT INTO,
  12365.  FROM the specified table(s), and puts the value INTO its parallel
  12366.  11,SELECT INTO,
  12367.  item in the variable_list.   The datatypes of corresponding items
  12368.  12,SELECT INTO,
  12369.  in the tables, SELECT_list, and variable_list  must be compatible
  12370.  13,SELECT INTO,
  12371.  or convertible.
  12372.  14,SELECT INTO,
  12373.  
  12374.  15,SELECT INTO,
  12375.  Store retrieved data in a record variable by declaring the record
  12376.  16,SELECT INTO,
  12377.  variable first with the %ROWTYPE attribute.
  12378.  17,SELECT INTO,
  12379.  
  12380.  18,SELECT INTO,
  12381.  
  12382.  19,SELECT INTO,
  12383.  See also: example select into, select list, variables, select,
  12384.  20,SELECT INTO,
  12385.            implicit conversions, attributes, fetch, commands, menu.
  12386.   1,SELECT List,
  12387.  
  12388.   2,SELECT List,
  12389.  
  12390.   3,SELECT List,
  12391.                             SELECT List
  12392.   4,SELECT List,
  12393.  
  12394.   5,SELECT List,
  12395.  SELECT list
  12396.   6,SELECT List,
  12397.    FROM...
  12398.   7,SELECT List,
  12399.  
  12400.   8,SELECT List,
  12401.  The SELECT list is one or more items of information, separated by
  12402.   9,SELECT List,
  12403.  commas, between the word SELECT and the FROM clause. The order of
  12404.  10,SELECT List,
  12405.  SELECT list entries determines the order of columns in the result.
  12406.  11,SELECT List,
  12407.  The SELECT list may contain:
  12408.  12,SELECT List,
  12409.  
  12410.  13,SELECT List,
  12411.      -  Column names and their aliases: ename employee, deptno
  12412.  14,SELECT List,
  12413.      -  Expressions in columns and constraints or host variables
  12414.  15,SELECT List,
  12415.      -  Group functions: MAX(sal), MIN(comm)
  12416.  16,SELECT List,
  12417.      -  Non-group functions: SYSDATE, INITCAP(ename)
  12418.  17,SELECT List,
  12419.  
  12420.  18,SELECT List,
  12421.  If the GROUP BY clause is used, the SELECT list may contain only
  12422.  19,SELECT List,
  12423.  group functions, expressions also listed in the GROUP BY clause,
  12424.  20,SELECT List,
  12425.  and constants or functions without parameters (such as SYSDATE).
  12426.  21,SELECT List,
  12427.  
  12428.  22,SELECT List,
  12429.  
  12430.  23,SELECT List,
  12431.  See also: example select list, select, group by, alias, expressions,
  12432.  24,SELECT List,
  12433.            group functions, uses of select, menu.
  12434.   1,SET,
  12435.  
  12436.   2,SET,
  12437.  
  12438.   3,SET,
  12439.                                      SET
  12440.   4,SET,
  12441.  
  12442.   5,SET,
  12443.  SET system_variable value
  12444.   6,SET,
  12445.                                         NUMF[ORMAT] format
  12446.   7,SET,
  12447.      ARRAY[SIZE] {20|n}                 NUM[WIDTH] {10|n}
  12448.   8,SET,
  12449.      AUTO[COMMIT] {OFF|ON|IMM[EDIATE]}  PAGES[IZE] {14|n}
  12450.   9,SET,
  12451.      BLO[CKTERMINATOR] {.|c}            PAU[SE] {OFF|ON|text}
  12452.  10,SET,
  12453.      CMDS[EP] {;|c|OFF|ON}              RECSEP {WR[APPED]|EA[CH]|OFF}
  12454.  11,SET,
  12455.      COM[PATIBILITY] {V5|V6}            RECSEPCHAR {_|c}SCAN {OFF|ON}
  12456.  12,SET,
  12457.      CON[CAT] {.|c|OFF|ON}              SHOW[MODE] {OFF|ON}
  12458.  13,SET,
  12459.      COPYC[OMMIT] {0|n}                 SPA[CE] {1|n}
  12460.  14,SET,
  12461.      CRT crt                            SQLC[ASE] {MIX[ED]|LO[WER]|UP[PER]}
  12462.  15,SET,
  12463.      DEF[INE] {&|c|OFF|ON}              SQLCO[NTINUE] {> | text}
  12464.  16,SET,
  12465.      ECHO {OFF|ON}                      SQLN[UMBER] {OFF|ON}
  12466.  17,SET,
  12467.      EMBEDDED {OFF|ON}                  SQLPRE[FIX] {#|c}
  12468.  18,SET,
  12469.      ESC[APE] {\|c|OFF|ON}              SQLP[ROMPT] {SQL>|text}
  12470.  19,SET,
  12471.      FEED[BACK] {6|n|OFF|ON}            SQLT[ERMINATOR] {;|c|OFF|ON}
  12472.  20,SET,
  12473.      FLU[SH] {OFF|ON}                   SUF[FIX] {SQL|text}
  12474.  21,SET,
  12475.      HEA[DING] {OFF|ON}                 TAB {OFF|ON}TERM[OUT] {OFF|ON}
  12476.  22,SET,
  12477.      HEADS[EP] {||c|OFF|ON}             TI[ME] {OFF|ON}
  12478.  23,SET,
  12479.      LIN[ESIZE] {80|n}                  TIMI[NG] {OFF|ON}
  12480.  24,SET,
  12481.      LONG {80|n}                        TRIM[OUT] {OFF|ON}
  12482.  25,SET,
  12483.      MAXD[ATA] n                        UND[ERLINE] {-|c|ON|OFF}
  12484.  26,SET,
  12485.      NEWP[AGE] {1|n}                    VER[IFY] {OFF|ON}
  12486.  27,SET,
  12487.      NULL text                          WRA[P] {OFF|ON}
  12488.  28,SET,
  12489.  
  12490.  29,SET,
  12491.  
  12492.  30,SET,
  12493.  Use SET to control SQL*Plus environment settings for the current session;
  12494.  31,SET,
  12495.  for example:   -   the display width for NUMBER data
  12496.  32,SET,
  12497.                 -   the display width for LONG data
  12498.  33,SET,
  12499.                 -   enabling or disabling the printing of column headings
  12500.  34,SET,
  12501.                 -   the number of lines per page
  12502.  35,SET,
  12503.  
  12504.  36,SET,
  12505.      ARRAY[SIZE] {20|n}
  12506.  37,SET,
  12507.          sets the number of rowscalled a batchthat SQL*Plus will fetch from
  12508.  38,SET,
  12509.          the database at one time (Range:1 - 5000). A large value increases
  12510.  39,SET,
  12511.          the efficiency of queries and subqueries that fetch many rows, but
  12512.  40,SET,
  12513.          requires more main memory in the host computer; values over 100 or
  12514.  41,SET,
  12515.          so provide little added performance.  ARRAYSIZE only improves the
  12516.  42,SET,
  12517.          efficiency of SQL*Plus operations; it has no other effect.
  12518.  43,SET,
  12519.  
  12520.  44,SET,
  12521.      AUTO[COMMIT] {OFF|ON|IMM[EDIATE]}
  12522.  45,SET,
  12523.          controls when ORACLE commits pending changes to the database.  ON
  12524.  46,SET,
  12525.          commits pending changes to the database after ORACLE executes each
  12526.  47,SET,
  12527.          SQL command or PL/SQL block.  OFF suppresses automatic committing,
  12528.  48,SET,
  12529.          so changes must be committed manually (with COMMIT, for example).
  12530.  49,SET,
  12531.          IMMEDIATE works just like ON.
  12532.  50,SET,
  12533.  
  12534.  51,SET,
  12535.      BLO[CKTERMINATOR] {.|c}
  12536.  52,SET,
  12537.          sets the non-alphanumeric character that ends PL/SQL blocks to c.
  12538.  53,SET,
  12539.          To execute the block, issue a RUN or / (slash) command.
  12540.  54,SET,
  12541.  
  12542.  55,SET,
  12543.      CMDS[EP] {;|c|ON|OFF}
  12544.  56,SET,
  12545.          sets the non-alphanumeric character used between multiple SQL*Plus
  12546.  57,SET,
  12547.          commands entered on one line to c.  ON or OFF sets whether or not
  12548.  58,SET,
  12549.          multiple commands can be entered on a line; ON automatically makes
  12550.  59,SET,
  12551.          ; (a semicolon) the command separator character.
  12552.  60,SET,
  12553.  
  12554.  61,SET,
  12555.      COM[PATIBILITY] {V5|V6}
  12556.  62,SET,
  12557.          controls whether SQL*Plus stores COMMIT and ROLLBACK commands in
  12558.  63,SET,
  12559.          the SQL buffer.  V6 stores them; V5 does not.  Set COMPATIBILITY
  12560.  64,SET,
  12561.          V5 to run command files created in ORACLE Version 5, V6 to run
  12562.  65,SET,
  12563.          command files created with Version 6.  See COMMIT and ROLLBACK.
  12564.  66,SET,
  12565.  
  12566.  67,SET,
  12567.      CON[CAT] {.|c|OFF|ON}
  12568.  68,SET,
  12569.          sets the character you can use to end a substitution variable name
  12570.  69,SET,
  12571.          when you want to use a character after the variable that SQL*Plus
  12572.  70,SET,
  12573.          would otherwise see as a part of the variable's name.  SQL*Plus
  12574.  71,SET,
  12575.          resets the value of CONCAT to a period when you switch CONCAT on.
  12576.  72,SET,
  12577.  
  12578.  73,SET,
  12579.      COPYC[OMMIT] {0|n}
  12580.  74,SET,
  12581.          controls the number of batches processed before the COPY command
  12582.  75,SET,
  12583.          commits database changes (Range: 0 - 5000).  Set the size of a
  12584.  76,SET,
  12585.          batch with the ARRAYSIZE variable.  If you set COPYCOMMIT to 0,
  12586.  77,SET,
  12587.          COPY commits changes only at the end of a copy operation.
  12588.  78,SET,
  12589.  
  12590.  79,SET,
  12591.      CRT crt
  12592.  80,SET,
  12593.          changes the default CRT file used in the SQL*Plus RUNFORM command.
  12594.  81,SET,
  12595.          To return to the original default (before CRT was set), set CRT to
  12596.  82,SET,
  12597.          nothing by entering two double quotes ("") for crt.
  12598.  83,SET,
  12599.  
  12600.  84,SET,
  12601.          To use NEW.CRT during a form invocation on a system where the
  12602.  85,SET,
  12603.          default CRT is OLD.CRT, invoke the form with either:
  12604.  86,SET,
  12605.  
  12606.  87,SET,
  12607.                SQL> RUNFORM -c NEW form_name
  12608.  88,SET,
  12609.          or    SQL> SET CRT NEWSQL> RUNFORM form_name
  12610.  89,SET,
  12611.  
  12612.  90,SET,
  12613.          The second method stores the CRT option; you do not have to
  12614.  91,SET,
  12615.          re-specify it for additional RUNFORM commands during the same
  12616.  92,SET,
  12617.          SQL*Plus session.
  12618.  93,SET,
  12619.  
  12620.  94,SET,
  12621.      DEF[INE] {&|c|OFF|ON}
  12622.  95,SET,
  12623.          sets c to be the character in front of substitution variables.
  12624.  96,SET,
  12625.          ON or OFF sets whether or not SQL*Plus will scan commands for
  12626.  97,SET,
  12627.          substitution variables and replace them with their values. An ON
  12628.  98,SET,
  12629.          or OFF DEFINE setting overrides the setting of the SCAN variable.
  12630.  99,SET,
  12631.  
  12632. 100,SET,
  12633.      ECHO {OFF|ON}
  12634. 101,SET,
  12635.          sets whether START lists each command in a command file as the
  12636. 102,SET,
  12637.          command is executed.  ON lists the commands; OFF does not.
  12638. 103,SET,
  12639.  
  12640. 104,SET,
  12641.      EMBEDDED {OFF|ON}
  12642. 105,SET,
  12643.          controls each report begins on a page.  OFF starts each report at
  12644. 106,SET,
  12645.          the top of a new page; ON allows a report to begin anywhere.  Set
  12646. 107,SET,
  12647.          EMBEDDED to ON to start printing a report immediately after the
  12648. 108,SET,
  12649.          previous one.
  12650. 109,SET,
  12651.  
  12652. 110,SET,
  12653.      ESC[APE] {\|c|OFF|ON}
  12654. 111,SET,
  12655.          defines the character you enter as the escape character.  OFF
  12656. 112,SET,
  12657.          undefines the escape character.  ON enables the escape character.
  12658. 113,SET,
  12659.  
  12660. 114,SET,
  12661.          Use the escape character before the substitution character (set
  12662. 115,SET,
  12663.          with SET DEFINE) to have SQL*Plus treat the substitution character
  12664. 116,SET,
  12665.          as an ordinary character, not a request for variable substitution.
  12666. 117,SET,
  12667.  
  12668. 118,SET,
  12669.      FEED[BACK] {6|n|OFF|ON}
  12670. 119,SET,
  12671.          shows the number of records returned by a query when at n or more
  12672. 120,SET,
  12673.          records are selected.  ON sets n to 1.  0 is the same as OFF.
  12674. 121,SET,
  12675.  
  12676. 122,SET,
  12677.      FLU[SH] {OFF|ON}
  12678. 123,SET,
  12679.          controls when output goes to the display device.  OFF allows the
  12680. 124,SET,
  12681.          host operating system to buffer output.  ON disables buffering.
  12682. 125,SET,
  12683.  
  12684. 126,SET,
  12685.          Use FLUSH OFF only when running a command file non-interactively
  12686. 127,SET,
  12687.          to suppress output and prompts until the run is over.  FLUSH OFF
  12688. 128,SET,
  12689.          may improve performance by reducing the amount of program I/O.
  12690. 129,SET,
  12691.  
  12692. 130,SET,
  12693.      HEA[DING] {OFF|ON}
  12694. 131,SET,
  12695.          controls printing of column headings in reports.  ON prints column
  12696. 132,SET,
  12697.          headings in reports; OFF suppresses column headings.
  12698. 133,SET,
  12699.  
  12700. 134,SET,
  12701.      HEADS[EP] {||c|OFF|ON}
  12702. 135,SET,
  12703.          sets the character you enter as the heading separator character.
  12704. 136,SET,
  12705.          You can use the heading separator character in the COLUMN command
  12706. 137,SET,
  12707.          and in the old forms of BTITLE and TTITLE to divide a column
  12708. 138,SET,
  12709.          heading or title onto more than one line.  Set HEADSEP OFF to
  12710. 139,SET,
  12711.          print a heading separator character like any other character.
  12712. 140,SET,
  12713.  
  12714. 141,SET,
  12715.      LIN[ESIZE] {80|n}
  12716. 142,SET,
  12717.          sets the total number of characters displayed on a line before
  12718. 143,SET,
  12719.          starting a new line, and controls the position of centered and
  12720. 144,SET,
  12721.          right-aligned text in TTITLE and BTITLE.  The range is 1 - 500.
  12722. 145,SET,
  12723.  
  12724. 146,SET,
  12725.      LONG {80|n}
  12726. 147,SET,
  12727.          sets the maximum width for displaying and copying LONG values; the
  12728. 148,SET,
  12729.          range is 1 - 32767.  LONG must be less than MAXDATA.
  12730. 149,SET,
  12731.  
  12732. 150,SET,
  12733.      MAXD[ATA] n
  12734. 151,SET,
  12735.          sets the maximum size, in bytes, of all ARRAYSIZE rows.  The
  12736. 152,SET,
  12737.          default and maximum values of n depend on the operating system.
  12738. 153,SET,
  12739.  
  12740. 154,SET,
  12741.      NEWP[AGE] {1|n}
  12742. 155,SET,
  12743.          sets the number of blank lines printed between the beginning of
  12744. 156,SET,
  12745.          each page and the top title.  A value of 0 sends a formfeed
  12746. 157,SET,
  12747.          between pages and clears the screen on most terminals.
  12748. 158,SET,
  12749.  
  12750. 159,SET,
  12751.      NULL text
  12752. 160,SET,
  12753.          sets the text to represent a null value in the result of a SELECT
  12754. 161,SET,
  12755.          statement. NULL without text shows a blank (the default).  Use the
  12756. 162,SET,
  12757.          NULL clause of the COLUMN command to override the setting of the
  12758. 163,SET,
  12759.          NULL variable for a given column.
  12760. 164,SET,
  12761.  
  12762. 165,SET,
  12763.      NUMF[ORMAT] format
  12764. 166,SET,
  12765.          sets the default format for displaying numbers.  Enter a number
  12766. 167,SET,
  12767.          format for format.  See FORMAT NUMBERS for format descriptions.
  12768. 168,SET,
  12769.  
  12770. 169,SET,
  12771.      NUM[WIDTH] {10|n}
  12772. 170,SET,
  12773.          sets the default width for displaying numbers.
  12774. 171,SET,
  12775.  
  12776. 172,SET,
  12777.      PAGES[IZE] {14|n}
  12778. 173,SET,
  12779.          sets the number of lines from the top title to the end of the
  12780. 174,SET,
  12781.          page.  With 11 inch long paper, a value of 54 (plus a NEWPAGE
  12782. 175,SET,
  12783.          value of 6) leaves one-inch margins above and below a report.
  12784. 176,SET,
  12785.  
  12786. 177,SET,
  12787.          Set PAGESIZE to 0 to suppress headings, page breaks, titles, the
  12788. 178,SET,
  12789.          initial blank line, and other formatting information.
  12790. 179,SET,
  12791.  
  12792. 180,SET,
  12793.      PAU[SE] {OFF|ON|text}
  12794. 181,SET,
  12795.          controls scrolling on the terminal when running reports.  Press
  12796. 182,SET,
  12797.          RETURN or [Clear] after seeing each pause.  ON pauses at the
  12798. 183,SET,
  12799.          beginning of each page of report output.  Text specifies the text
  12800. 184,SET,
  12801.          displayed whenever SQL*Plus pauses.  To enter multiple words,
  12802. 185,SET,
  12803.          enclose text in 'single quotes'.
  12804. 186,SET,
  12805.  
  12806. 187,SET,
  12807.          You can embed terminal-dependent escape sequences in PAUSE to
  12808. 188,SET,
  12809.          create inverse video messages and other effects, where supported.
  12810. 189,SET,
  12811.  
  12812. 190,SET,
  12813.      RECSEP {WR[APPED]|EA[CH]|OFF} and RECSEPCHAR { |c}
  12814. 191,SET,
  12815.          displays or prints record separators.  A record separator is the
  12816. 192,SET,
  12817.          RECSEPCHAR (character) repeated LINESIZE times on a single line.
  12818. 193,SET,
  12819.          (RECSEPCHAR is the record-separating character.  Default = space.)
  12820. 194,SET,
  12821.  
  12822. 195,SET,
  12823.          RECSEP sets where the record separation occurs.  WRAPPED prints a
  12824. 196,SET,
  12825.          record separator only after wrapped lines.  EACH prints a record
  12826. 197,SET,
  12827.          separator after every row.  OFF does not print a record separator.
  12828. 198,SET,
  12829.  
  12830. 199,SET,
  12831.      SCAN {OFF|ON}
  12832. 200,SET,
  12833.          controls scanning for substitution variables and parameters.
  12834. 201,SET,
  12835.          OFF suppresses their processing; ON allows normal processing.
  12836. 202,SET,
  12837.  
  12838. 203,SET,
  12839.      SHOW[MODE] {OFF|ON}
  12840. 204,SET,
  12841.          controls whether or not SQL*Plus lists the old and new settings of
  12842. 205,SET,
  12843.          a SQL*Plus system variable when you change the setting with SET.
  12844. 206,SET,
  12845.          ON lists the settings; OFF does not.  BOTH works like ON.
  12846. 207,SET,
  12847.  
  12848. 208,SET,
  12849.      SPA[CE] {1|n}
  12850. 209,SET,
  12851.          sets the number of spaces between output columns (Maximum = 10).
  12852. 210,SET,
  12853.  
  12854. 211,SET,
  12855.      SQLC[ASE] {MIX[ED]|LO[WER]|UP[PER]}
  12856. 212,SET,
  12857.          changes the case of SQL commands and PL/SQL blocks just prior to
  12858. 213,SET,
  12859.          execution.  SQL*Plus converts all text in the command, including
  12860. 214,SET,
  12861.          quoted literals and identifiers, as follows:
  12862. 215,SET,
  12863.  
  12864. 216,SET,
  12865.                uppercase if SQLCASE equals UPPER
  12866. 217,SET,
  12867.                lowercase if SQLCASE equals LOWER
  12868. 218,SET,
  12869.                unchanged if SQLCASE equals MIXED
  12870. 219,SET,
  12871.  
  12872. 220,SET,
  12873.      SQLCASE does not change the SQL buffer itself.
  12874. 221,SET,
  12875.  
  12876. 222,SET,
  12877.      SQLCO[NTINUE] {>|text}
  12878. 223,SET,
  12879.          sets the character sequence SQL*Plus displays as a prompt after
  12880. 224,SET,
  12881.          you use - (hyphen) to continue a SQL*Plus command on a new line.
  12882. 225,SET,
  12883.  
  12884. 226,SET,
  12885.      SQLN[UMBER] {OFF|ON}
  12886. 227,SET,
  12887.          sets the prompt for the second and subsequent lines of a SQL
  12888. 228,SET,
  12889.          command or PL/SQL block.  ON sets the prompt to be the line
  12890. 229,SET,
  12891.          number.  OFF sets the prompt to the value of SQLPROMPT.
  12892. 230,SET,
  12893.  
  12894. 231,SET,
  12895.      SQLPRE[FIX] {#|c}
  12896. 232,SET,
  12897.          sets the SQL*Plus prefix character.  While entering a SQL command
  12898. 233,SET,
  12899.          or PL/SQL block, you can enter a SQL*Plus command on a separate
  12900. 234,SET,
  12901.          line, prefixed by the SQL*Plus prefix character, to execute the
  12902. 235,SET,
  12903.          command immediately without affecting the SQL command or PL/SQL
  12904. 236,SET,
  12905.          block. The prefix character must be non-alphanumeric.
  12906. 237,SET,
  12907.  
  12908. 238,SET,
  12909.      SQLP[ROMPT] {SQL>|text}
  12910. 239,SET,
  12911.          sets the SQL*Plus command prompt.
  12912. 240,SET,
  12913.  
  12914. 241,SET,
  12915.      SQLT[ERMINATOR] {;|c|OFF|ON}
  12916. 242,SET,
  12917.          sets to c the character used to end and execute SQL command.  OFF
  12918. 243,SET,
  12919.          recognizes no command terminator; you terminate a SQL command by
  12920. 244,SET,
  12921.          entering an empty line. ON resets the terminator to ; (semicolon).
  12922. 245,SET,
  12923.  
  12924. 246,SET,
  12925.      SUF[FIX] {SQL|text}
  12926. 247,SET,
  12927.          sets the default file suffix (extension) that SQL*Plus uses in
  12928. 248,SET,
  12929.          commands that refer to command files.  SUFFIX does not control
  12930. 249,SET,
  12931.          extensions for output (spool) files.
  12932. 250,SET,
  12933.  
  12934. 251,SET,
  12935.      TAB {OFF|ON}
  12936. 252,SET,
  12937.          controls how SQL*Plus formats white space in the output.  OFF uses
  12938. 253,SET,
  12939.          spaces to add white space in the output.  ON uses TAB characters.
  12940. 254,SET,
  12941.          The default value is system-dependent; SHOW TAB shows the default.
  12942. 255,SET,
  12943.  
  12944. 256,SET,
  12945.      TERM[OUT] {OFF|ON}
  12946. 257,SET,
  12947.          controls the display of output generated by commands executed from
  12948. 258,SET,
  12949.          a file.  OFF suppresses the display so you can spool output from a
  12950. 259,SET,
  12951.          command file without displaying the output.  ON shows the output.
  12952. 260,SET,
  12953.          TERMOUT OFF doesn't affect interactively-entered command output.
  12954. 261,SET,
  12955.  
  12956. 262,SET,
  12957.      TI[ME] {OFF|ON}
  12958. 263,SET,
  12959.          controls the display of the current time.  ON displays the current
  12960. 264,SET,
  12961.          time before each command prompt.  OFF suppresses the time display.
  12962. 265,SET,
  12963.  
  12964. 266,SET,
  12965.      TIMI[NG] {OFF|ON}
  12966. 267,SET,
  12967.          sets the display of timing statistics.  ON shows timing statistics
  12968. 268,SET,
  12969.          for each SQL command or PL/SQL block run.  OFF suppresses timing.
  12970. 269,SET,
  12971.          Use the TIMING command to control the timing of multiple commands.
  12972. 270,SET,
  12973.  
  12974. 271,SET,
  12975.      TRIM[OUT] {OFF|ON}
  12976. 272,SET,
  12977.          determines whether SQL*Plus allows trailing blanks at the end of
  12978. 273,SET,
  12979.          each displayed line.  ON removes blanks at the end of each line,
  12980. 274,SET,
  12981.          improving performance especially when using a slow communications
  12982. 275,SET,
  12983.          device.  OFF displays trailing blanks.  TRIMOUT ON does not affect
  12984. 276,SET,
  12985.          spooled output; SQL*Plus ignores TRIMOUT ON unless you set TAB ON.
  12986. 277,SET,
  12987.  
  12988. 278,SET,
  12989.      UND[ERLINE] {-|c|ON|OFF}
  12990. 279,SET,
  12991.          sets the character used to underline column headings in SQL*Plus
  12992. 280,SET,
  12993.          reports to c.  ON or OFF turns underlining on or off without
  12994. 281,SET,
  12995.          affecting the value of c.
  12996. 282,SET,
  12997.  
  12998. 283,SET,
  12999.      VER[IFY] {OFF|ON}
  13000. 284,SET,
  13001.          controls whether SQL*Plus lists the text of a command before and
  13002. 285,SET,
  13003.          after SQL*Plus replaces substitution variables with values.  ON
  13004. 286,SET,
  13005.          lists the text; OFF suppresses the listing.
  13006. 287,SET,
  13007.  
  13008. 288,SET,
  13009.      WRA[P] {OFF|ON}
  13010. 289,SET,
  13011.          controls whether SQL*Plus truncates the display of a data item if
  13012. 290,SET,
  13013.          it is longer than the current line width.  OFF truncates it; ON
  13014. 291,SET,
  13015.          allows it to wrap to the next line.  The COLUMN command's WRAPPED
  13016. 292,SET,
  13017.          and TRUNCATED override the WRAP setting for specific columns.
  13018. 293,SET,
  13019.  
  13020. 294,SET,
  13021.  
  13022. 295,SET,
  13023.  SQL*Plus maintains system variables (SET command variables) so you can
  13024. 296,SET,
  13025.  tailor the environment for a SQL*Plus session.  You change these system
  13026. 297,SET,
  13027.  variables with the SET command and list them with the SHOW command.
  13028. 298,SET,
  13029.  
  13030. 299,SET,
  13031.  Examples: Here are some uses of SET command variables:
  13032. 300,SET,
  13033.  
  13034. 301,SET,
  13035.            COMPATIBILITY - To run command file SALARY.SQL, created with
  13036. 302,SET,
  13037.            Version 5 of ORACLE, enter:
  13038. 303,SET,
  13039.  
  13040. 304,SET,
  13041.                SQL> SET COMPATIBILITY V5SQL> START SALARY
  13042. 305,SET,
  13043.  
  13044. 306,SET,
  13045.            After running the file, reset compatibility to V6:
  13046. 307,SET,
  13047.  
  13048. 308,SET,
  13049.                SQL> SET COMPATIBILITY V6
  13050. 309,SET,
  13051.  
  13052. 310,SET,
  13053.            Or you could add SET COMPATIBILITY V5 to the beginning of the
  13054. 311,SET,
  13055.            command file, and reset COMPATIBILITY to V6 at its end.
  13056. 312,SET,
  13057.  
  13058. 313,SET,
  13059.            ESCAPE - If you define the escape character as !, entering
  13060. 314,SET,
  13061.  
  13062. 315,SET,
  13063.                SQL> ACCEPT v1 PROMPT 'Enter !&1:'
  13064. 316,SET,
  13065.  
  13066. 317,SET,
  13067.            displays the prompt,  Enter &1:
  13068. 318,SET,
  13069.  
  13070. 319,SET,
  13071.            HEADING - The next example suppresses the display of column
  13072. 320,SET,
  13073.            headings in a report, then runs a SELECT statement:
  13074. 321,SET,
  13075.  
  13076. 322,SET,
  13077.                SQL> SET HEADING OFF
  13078. 323,SET,
  13079.                SQL> SELECT ENAME, SAL FROM EMP  2  WHERE JOB = 'CLERK';
  13080. 324,SET,
  13081.  
  13082. 325,SET,
  13083.            Output:  ADAMS        1100
  13084. 326,SET,
  13085.                     JAMES         950
  13086. 327,SET,
  13087.                     MILLER       1300
  13088. 328,SET,
  13089.  
  13090. 329,SET,
  13091.            LONG - To set the maximum width for displaying and copying LONG
  13092. 330,SET,
  13093.            values to 500, enter:
  13094. 331,SET,
  13095.  
  13096. 332,SET,
  13097.                SQL> SET LONG 500
  13098. 333,SET,
  13099.  
  13100. 334,SET,
  13101.  
  13102. 335,SET,
  13103.            The LONG data will wrap on your screen; SQL*Plus truncates at
  13104. 336,SET,
  13105.            the 501st character.
  13106. 337,SET,
  13107.  
  13108. 338,SET,
  13109.            SQLCONTINUE - To set the SQL*Plus command continuation prompt to
  13110. 339,SET,
  13111.            an exclamation point followed by a space, enter:
  13112. 340,SET,
  13113.  
  13114. 341,SET,
  13115.                SQL> SET SQLCONTINUE '! '
  13116. 342,SET,
  13117.  
  13118. 343,SET,
  13119.            SQL*Plus prompts for continuation as follows:
  13120. 344,SET,
  13121.  
  13122. 345,SET,
  13123.                SQL> TTITLE 'YEARLY INCOME' -
  13124. 346,SET,
  13125.                ! RIGHT SQL.PNO SKIP 2 -
  13126. 347,SET,
  13127.                ! CENTER 'PC DIVISION'
  13128. 348,SET,
  13129.                SQL>
  13130. 349,SET,
  13131.  
  13132. 350,SET,
  13133.            SUFFIX - To set the default command file extension to UFI:
  13134. 351,SET,
  13135.  
  13136. 352,SET,
  13137.                SQL> SET SUFFIX UFI
  13138. 353,SET,
  13139.  
  13140. 354,SET,
  13141.            If you then enter:
  13142. 355,SET,
  13143.  
  13144. 356,SET,
  13145.                SQL> GET EXAMPLE
  13146. 357,SET,
  13147.  
  13148. 358,SET,
  13149.            SQL*Plus looks for file EXAMPLE.UFI instead of file EXAMPLE.SQL.
  13150. 359,SET,
  13151.  
  13152. 360,SET,
  13153.  See also:  commands, menu.
  13154.   1,SET TRANSACTION,
  13155.  
  13156.   2,SET TRANSACTION,
  13157.  
  13158.   3,SET TRANSACTION,
  13159.                             SET TRANSACTION
  13160.   4,SET TRANSACTION,
  13161.                                                  SQL statement
  13162.   5,SET TRANSACTION,
  13163.  SET TRANSACTION READ ONLY
  13164.   6,SET TRANSACTION,
  13165.  
  13166.   7,SET TRANSACTION,
  13167.  
  13168.   8,SET TRANSACTION,
  13169.  SET TRANSACTION READ ONLY affects the current transaction. All
  13170.   9,SET TRANSACTION,
  13171.  queries in the transaction ignore changes by other users since
  13172.  10,SET TRANSACTION,
  13173.  the transaction began. SET TRANSACTION READ ONLY is especially
  13174.  11,SET TRANSACTION,
  13175.  useful for generating reports which query multiple tables that
  13176.  12,SET TRANSACTION,
  13177.  are constantly being updated by others. A COMMIT or a ROLLBACK
  13178.  13,SET TRANSACTION,
  13179.  statement ends the read only state.
  13180.  14,SET TRANSACTION,
  13181.  
  13182.  15,SET TRANSACTION,
  13183.  You cannot use a DELETE, INSERT, or UPDATE statement in a READ
  13184.  16,SET TRANSACTION,
  13185.  ONLY transaction; only queries are permitted. Actions of other
  13186.  17,SET TRANSACTION,
  13187.  users and other transactions are not affected. SET TRANSACTION
  13188.  18,SET TRANSACTION,
  13189.  READ ONLY must be the first statement in the transaction.
  13190.  19,SET TRANSACTION,
  13191.  
  13192.  20,SET TRANSACTION,
  13193.  
  13194.  21,SET TRANSACTION,
  13195.  See also: example set transaction, transactions, query, commit,
  13196.  22,SET TRANSACTION,
  13197.            rollback, commands, menu.
  13198.   1,SHOW,
  13199.  
  13200.   2,SHOW,
  13201.  
  13202.   3,SHOW,
  13203.                                     SHOW
  13204.   4,SHOW,
  13205.  
  13206.   5,SHOW,
  13207.  SHO[W] option
  13208.   6,SHOW,
  13209.  
  13210.   7,SHOW,
  13211.      where option can be:  system_variable, ALL, BTI[TLE], LNO, PNO,
  13212.   8,SHOW,
  13213.                            REL[EASE], SPOO[L], SQLCODE, TTI[TLE], USER.
  13214.   9,SHOW,
  13215.  
  13216.  10,SHOW,
  13217.  Use SHOW to display the value of a SQL*Plus system variable.
  13218.  11,SHOW,
  13219.  
  13220.  12,SHOW,
  13221.      system_variable
  13222.  13,SHOW,
  13223.          is any system variable set by the SET command.
  13224.  14,SHOW,
  13225.  
  13226.  15,SHOW,
  13227.      ALL
  13228.  16,SHOW,
  13229.          lists the settings of all SHOW options.
  13230.  17,SHOW,
  13231.  
  13232.  18,SHOW,
  13233.      BTI[TLE]
  13234.  19,SHOW,
  13235.          shows the current BTITLE definition.
  13236.  20,SHOW,
  13237.  
  13238.  21,SHOW,
  13239.      LNO shows the current line number--the position in the current page
  13240.  22,SHOW,
  13241.          of the display and/or spooled output.
  13242.  23,SHOW,
  13243.  
  13244.  24,SHOW,
  13245.      PNO shows the current page number.
  13246.  25,SHOW,
  13247.  
  13248.  26,SHOW,
  13249.      REL[EASE]
  13250.  27,SHOW,
  13251.          shows the release number of ORACLE RDBMS SQL*Plus is accessing.
  13252.  28,SHOW,
  13253.  
  13254.  29,SHOW,
  13255.      SPOO[L]
  13256.  30,SHOW,
  13257.          shows whether or not output is being spooled.
  13258.  31,SHOW,
  13259.  
  13260.  32,SHOW,
  13261.      SQLCODE
  13262.  33,SHOW,
  13263.          shows the value of SQL.SQLCODE; for example, the SQL return code
  13264.  34,SHOW,
  13265.          of the most recent operation.
  13266.  35,SHOW,
  13267.  
  13268.  36,SHOW,
  13269.      TTI[TLE]
  13270.  37,SHOW,
  13271.          shows the current TTITLE definition.
  13272.  38,SHOW,
  13273.  
  13274.  39,SHOW,
  13275.      USER
  13276.  40,SHOW,
  13277.          shows the username currently accessing SQL*Plus.
  13278.  41,SHOW,
  13279.  
  13280.  42,SHOW,
  13281.  
  13282.  43,SHOW,
  13283.  Example:  To list the current LINESIZE, enter:
  13284.  44,SHOW,
  13285.  
  13286.  45,SHOW,
  13287.                SQL> SHOW LINESIZE
  13288.  46,SHOW,
  13289.  
  13290.  47,SHOW,
  13291.            If the current linesize is 80 characters, SQL*Plus responds:
  13292.  48,SHOW,
  13293.  
  13294.  49,SHOW,
  13295.                linesize 80
  13296.  50,SHOW,
  13297.  
  13298.  51,SHOW,
  13299.  See also:  commands, menu.
  13300.   1,SPOOL,
  13301.  
  13302.   2,SPOOL,
  13303.  
  13304.   3,SPOOL,
  13305.                                    SPOOL
  13306.   4,SPOOL,
  13307.  
  13308.   5,SPOOL,
  13309.  SPO[OL] [file_name[.ext ] | OFF | OUT ]
  13310.   6,SPOOL,
  13311.  
  13312.   7,SPOOL,
  13313.  Use SPOOL to store query results in an operating system file, or send the
  13314.   8,SPOOL,
  13315.  file to a default printer.  SPOOL alone lists the current spooling status.
  13316.   9,SPOOL,
  13317.  
  13318.  10,SPOOL,
  13319.      file_name[.ext]
  13320.  11,SPOOL,
  13321.          is the name of the file to receive the spool.  SPOOL file_name
  13322.  12,SPOOL,
  13323.          begins spooling displayed output to the named file.  If you omit
  13324.  13,SPOOL,
  13325.          an extension, SPOOL uses a default extension (usually LST or LIS).
  13326.  14,SPOOL,
  13327.  
  13328.  15,SPOOL,
  13329.      OFF stops spooling.
  13330.  16,SPOOL,
  13331.  
  13332.  17,SPOOL,
  13333.      OUT stops spooling and sends the file to your host computer's default
  13334.  18,SPOOL,
  13335.          printer.  for the current spooling status.
  13336.  19,SPOOL,
  13337.  
  13338.  20,SPOOL,
  13339.  
  13340.  21,SPOOL,
  13341.  To spool output generated by commands in a command file without displaying
  13342.  22,SPOOL,
  13343.  the output on the screen, use SET TERMOUT OFF.  SET TERMOUT OFF does not
  13344.  23,SPOOL,
  13345.  affect output from commands run interactively.
  13346.  24,SPOOL,
  13347.  
  13348.  25,SPOOL,
  13349.  Examples: To record your displayed output in a file named DIARY using the
  13350.  26,SPOOL,
  13351.            default file extension, enter:
  13352.  27,SPOOL,
  13353.  
  13354.  28,SPOOL,
  13355.                SQL> SPOOL DIARY
  13356.  29,SPOOL,
  13357.  
  13358.  30,SPOOL,
  13359.            To stop spooling and print the file on your default printer:
  13360.  31,SPOOL,
  13361.  
  13362.  32,SPOOL,
  13363.                SQL> SPOOL OUT
  13364.  33,SPOOL,
  13365.  
  13366.  34,SPOOL,
  13367.  See also:  commands, menu.
  13368.   1,SQL in PL/SQL,
  13369.  
  13370.   2,SQL in PL/SQL,
  13371.  
  13372.   3,SQL in PL/SQL,
  13373.                           SQL in PL/SQL
  13374.   4,SQL in PL/SQL,
  13375.  
  13376.   5,SQL in PL/SQL,
  13377.  SQL is a non-procedural relational database management system
  13378.   6,SQL in PL/SQL,
  13379.  language that processes sets of records and provides automatic
  13380.   7,SQL in PL/SQL,
  13381.  navigation to data. SQL enables you to specify the results you
  13382.   8,SQL in PL/SQL,
  13383.  want without having to specify the access method to obtain the
  13384.   9,SQL in PL/SQL,
  13385.  results. PL/SQL is a procedural language with flow of control,
  13386.  10,SQL in PL/SQL,
  13387.  looping, cursor management, and exception handling tools.
  13388.  11,SQL in PL/SQL,
  13389.  
  13390.  12,SQL in PL/SQL,
  13391.  Statements - You can use any SQL data manipulation or transaction
  13392.  13,SQL in PL/SQL,
  13393.               processing statement in PL/SQL blocks in addition to
  13394.  14,SQL in PL/SQL,
  13395.               PL/SQL assignments (var := var + 1), flow of control
  13396.  15,SQL in PL/SQL,
  13397.               statements (IF, GOTO, EXIT), as well as loops (LOOP,
  13398.  16,SQL in PL/SQL,
  13399.               FOR...LOOP, WHILE...LOOP).
  13400.  17,SQL in PL/SQL,
  13401.  
  13402.  18,SQL in PL/SQL,
  13403.  Functions -  A SQL statement in a PL/SQL block can call any SQL
  13404.  19,SQL in PL/SQL,
  13405.               function; a PL/SQL statement in a block can call any
  13406.  20,SQL in PL/SQL,
  13407.               SQL function except group functions.
  13408.  21,SQL in PL/SQL,
  13409.  
  13410.  22,SQL in PL/SQL,
  13411.  Predicates - In PL/SQL you can use all conditions of WHERE in SQL
  13412.  23,SQL in PL/SQL,
  13413.               statements, and all SQL comparison operators.
  13414.  24,SQL in PL/SQL,
  13415.  
  13416.  25,SQL in PL/SQL,
  13417.  See also: loops, error handling, cursors, variables, menu.
  13418.   1,SQL% Cursor,
  13419.  
  13420.   2,SQL% Cursor,
  13421.  
  13422.   3,SQL% Cursor,
  13423.                             SQL% Cursor
  13424.   4,SQL% Cursor,
  13425.  
  13426.   5,SQL% Cursor,
  13427.  PL/SQL implicitly opens a cursor (the SQL% cursor) to process each
  13428.   6,SQL% Cursor,
  13429.  SQL statement unassociated with an explicitly declared cursor. The
  13430.   7,SQL% Cursor,
  13431.  SQL% cursor's attributes provide useful information about outcomes
  13432.   8,SQL% Cursor,
  13433.  in the execution of DELETE, UPDATE, and INSERT statements:
  13434.   9,SQL% Cursor,
  13435.  
  13436.  10,SQL% Cursor,
  13437.  ATTRIBUTE      IF ROWS ARE DELETED          IF NO ROWS ARE DELETED
  13438.  11,SQL% Cursor,
  13439.                 UPDATED OR INSERTED          UPDATED OR INSERTED
  13440.  12,SQL% Cursor,
  13441.  ------------------------------------------------------------------
  13442.  13,SQL% Cursor,
  13443.  SQL%NOTFOUND   Evaluates to FALSE           Evaluates to TRUE
  13444.  14,SQL% Cursor,
  13445.  
  13446.  15,SQL% Cursor,
  13447.  SQL%FOUND      Evaluates to TRUE            Evaluates to FALSE
  13448.  16,SQL% Cursor,
  13449.  
  13450.  17,SQL% Cursor,
  13451.  SQL%ROWCOUNT   Returns the number of rows   Returns a zero
  13452.  18,SQL% Cursor,
  13453.                 deleted/updated/inserted
  13454.  19,SQL% Cursor,
  13455.  
  13456.  20,SQL% Cursor,
  13457.  
  13458.  21,SQL% Cursor,
  13459.  See also: declare cursor, cursors, cursor attributes, delete, update,
  13460.  22,SQL% Cursor,
  13461.            insert, attributes (%type and %rowtype), menu.
  13462.   1,SQLPLUS,
  13463.  
  13464.   2,SQLPLUS,
  13465.  
  13466.   3,SQLPLUS,
  13467.                                     SQLPLUS
  13468.   4,SQLPLUS,
  13469.  
  13470.   5,SQLPLUS,
  13471.  SQLPLUS [ [-S[ILENT] ] [logon] [start] ] | -?
  13472.   6,SQLPLUS,
  13473.  
  13474.   7,SQLPLUS,
  13475.      logon:  username[/password][@database_specification]|/|/NOLOG
  13476.   8,SQLPLUS,
  13477.      start:  @file_name[.ext ] [arg1 arg2 .. .]
  13478.   9,SQLPLUS,
  13479.  
  13480.  10,SQLPLUS,
  13481.  
  13482.  11,SQLPLUS,
  13483.  SQLPLUS starts SQL*Plus from the operating system prompt.  Start enables
  13484.  12,SQLPLUS,
  13485.  you to enter a command file name and arguments.  SQL*Plus passes the
  13486.  13,SQLPLUS,
  13487.  arguments to the command file as though you executed the file with the
  13488.  14,SQLPLUS,
  13489.  SQL*Plus START command.
  13490.  15,SQLPLUS,
  13491.  
  13492.  16,SQLPLUS,
  13493.  If you omit logon and specify start, SQL*Plus assumes that the first line
  13494.  17,SQLPLUS,
  13495.  of the command file contains a valid logon.  If both start and logon are
  13496.  18,SQLPLUS,
  13497.  omitted, SQL*Plus prompts for logon information.
  13498.  19,SQLPLUS,
  13499.  
  13500.  20,SQLPLUS,
  13501.      username[/password]
  13502.  21,SQLPLUS,
  13503.          are the username and password with which to start SQL*Plus and
  13504.  22,SQLPLUS,
  13505.          connect to ORACLE.  If omitted, SQL*Plus prompts for them.  If
  13506.  23,SQLPLUS,
  13507.          you enter / (a slash) or enter RETURN to the prompt for username,
  13508.  24,SQLPLUS,
  13509.          SQL*Plus logs you on with a default logon (see "/" below).
  13510.  25,SQLPLUS,
  13511.  
  13512.  26,SQLPLUS,
  13513.      /   is a default (ops$) logon.  In a default logon, SQL*Plus tries to
  13514.  27,SQLPLUS,
  13515.          log on with the username OPS$name, where name is your operating
  13516.  28,SQLPLUS,
  13517.          system username.  You cannot enter a database_specification with a
  13518.  29,SQLPLUS,
  13519.          default logon.
  13520.  30,SQLPLUS,
  13521.  
  13522.  31,SQLPLUS,
  13523.      /NOLOG
  13524.  32,SQLPLUS,
  13525.          establishes no initial connection to ORACLE.  Before issuing any
  13526.  33,SQLPLUS,
  13527.          SQL commands, you must issue a CONNECT command to establish a
  13528.  34,SQLPLUS,
  13529.          valid logon.  Use /NOLOG to have a SQL*Plus command file prompt
  13530.  35,SQLPLUS,
  13531.          the user for the name of a database.
  13532.  36,SQLPLUS,
  13533.  
  13534.  37,SQLPLUS,
  13535.      @database_specification
  13536.  38,SQLPLUS,
  13537.          consists of a SQL*Net connection string; the syntax depends on the
  13538.  39,SQLPLUS,
  13539.          SQL*Net communications protocol your Oracle installation uses.
  13540.  40,SQLPLUS,
  13541.  
  13542.  41,SQLPLUS,
  13543.      -S[ILENT]
  13544.  42,SQLPLUS,
  13545.          suppresses all SQL*Plus information and prompt messages, including
  13546.  43,SQLPLUS,
  13547.          the command prompt and the banner usually displayed when SQL*Plus
  13548.  44,SQLPLUS,
  13549.          is started.  Use SILENT to make the use of SQL*Plus invisible to
  13550.  45,SQLPLUS,
  13551.          the user when invoking SQL*Plus within another program.
  13552.  46,SQLPLUS,
  13553.  
  13554.  47,SQLPLUS,
  13555.      -?  makes SQLPLUS display its current version and level number, then
  13556.  48,SQLPLUS,
  13557.          returns control to the operating system.  The ? (question mark)
  13558.  49,SQLPLUS,
  13559.          must come right after the - (hyphen); a space is not permitted.
  13560.  50,SQLPLUS,
  13561.  
  13562.  51,SQLPLUS,
  13563.  
  13564.  52,SQLPLUS,
  13565.  SQL*Plus supports a Site Profile, a SQL*Plus command file created by the
  13566.  53,SQLPLUS,
  13567.  database administrator and executed whenever a user starts SQL*Plus and
  13568.  54,SQLPLUS,
  13569.  SQL*Plus establishes the ORACLE connection.  The Site Profile enables the
  13570.  55,SQLPLUS,
  13571.  DBA to set up SQL*Plus environment defaults for all users at a particular
  13572.  56,SQLPLUS,
  13573.  site.  Users cannot directly access the Site Profile.  The default name
  13574.  57,SQLPLUS,
  13575.  and location of the Site Profile depend on your system.
  13576.  58,SQLPLUS,
  13577.  
  13578.  59,SQLPLUS,
  13579.  SQL*Plus also supports a User Profile, executed after the Site Profile.
  13580.  60,SQLPLUS,
  13581.  SQL*Plus searches for file LOGIN.SQL in your current directory.  If it's
  13582.  61,SQLPLUS,
  13583.  not there, SQL*Plus searches a system-dependent path to find the file;
  13584.  62,SQLPLUS,
  13585.  some operating systems may not support this path-search.  If the LOGIN
  13586.  63,SQLPLUS,
  13587.  file is not found, a warning message is displayed, and the logon process
  13588.  64,SQLPLUS,
  13589.  continues.
  13590.  65,SQLPLUS,
  13591.  
  13592.  66,SQLPLUS,
  13593.  
  13594.  67,SQLPLUS,
  13595.  Examples: To start SQL*Plus with username SCOTT and password TIGER, enter:
  13596.  68,SQLPLUS,
  13597.  
  13598.  69,SQLPLUS,
  13599.                SQLPLUS SCOTT/TIGER
  13600.  70,SQLPLUS,
  13601.  
  13602.  71,SQLPLUS,
  13603.            To start SQL*Plus, as above, and to make POLICY the default
  13604.  72,SQLPLUS,
  13605.            database, enter:
  13606.  73,SQLPLUS,
  13607.  
  13608.  74,SQLPLUS,
  13609.                SQLPLUS SCOTT/TIGER@POLICY
  13610.  75,SQLPLUS,
  13611.  
  13612.  76,SQLPLUS,
  13613.            To start SQL*Plus and run a command file named STARTUP with the
  13614.  77,SQLPLUS,
  13615.            extension SQL, enter:
  13616.  78,SQLPLUS,
  13617.  
  13618.  79,SQLPLUS,
  13619.                SQLPLUS SCOTT/TIGER @STARTUP
  13620.  80,SQLPLUS,
  13621.  
  13622.  81,SQLPLUS,
  13623.            Note the space between TIGER and @STARTUP.
  13624.  82,SQLPLUS,
  13625.  
  13626.  83,SQLPLUS,
  13627.  See also:  remote databases, commands, menu.
  13628.   1,START,
  13629.  
  13630.   2,START,
  13631.  
  13632.   3,START,
  13633.                                   START
  13634.   4,START,
  13635.  
  13636.   5,START,
  13637.  STA[RT] file_name[.ext] [arg1 arg2 ... ]
  13638.   6,START,
  13639.  
  13640.   7,START,
  13641.  START executes the contents of a command file.  The @ ("at" sign) command
  13642.   8,START,
  13643.  works like START, but doesn't enable the passing of values to parameters.
  13644.   9,START,
  13645.  
  13646.  10,START,
  13647.      file_name[.ext]
  13648.  11,START,
  13649.          is the command file to execute. If you omit an extension, SQL*Plus
  13650.  12,START,
  13651.          assumes the default command-file extension (normally SQL).
  13652.  13,START,
  13653.  
  13654.  14,START,
  13655.          When you enter START file_name.ext, SQL*Plus searches for a file
  13656.  15,START,
  13657.          with the specified name and extension in the current default
  13658.  16,START,
  13659.          directory.  If SQL*Plus doesn't find the file, it searches a
  13660.  17,START,
  13661.          system-dependent path for the FROM file.  Some operating systems
  13662.  18,START,
  13663.          don't support this path-search.
  13664.  19,START,
  13665.  
  13666.  20,START,
  13667.      arg1 arg2 ...
  13668.  21,START,
  13669.          are data items to be passed to parameters in the command file.
  13670.  22,START,
  13671.          If you enter one or more arguments, SQL*Plus substitutes the
  13672.  23,START,
  13673.          values into the parameters (&1, &2, and so forth) in the command
  13674.  24,START,
  13675.          file.  The first argument replaces each occurrence of &1, the
  13676.  25,START,
  13677.          second replaces each occurrence of &2, and so forth.
  13678.  26,START,
  13679.  
  13680.  27,START,
  13681.  The START command DEFINEs the parameters with the values of the arguments;
  13682.  28,START,
  13683.  if you START the file again in this session, you can enter new arguments
  13684.  29,START,
  13685.  or omit the arguments to use the old values.
  13686.  30,START,
  13687.  
  13688.  31,START,
  13689.  
  13690.  32,START,
  13691.  Example:  File PROMOTE.SQL, used to promote employees, contains:
  13692.  33,START,
  13693.  
  13694.  34,START,
  13695.                SELECT * FROM EMP WHERE MGR=&1 AND JOB='&2' AND SAL>&3;
  13696.  35,START,
  13697.  
  13698.  36,START,
  13699.            To run this command file, enter:
  13700.  37,START,
  13701.  
  13702.  38,START,
  13703.                SQL> START PROMOTE 7280 CLERK 950
  13704.  39,START,
  13705.  
  13706.  40,START,
  13707.            SQL*Plus then executes the following command:
  13708.  41,START,
  13709.  
  13710.  42,START,
  13711.                SELECT * FROM EMP
  13712.  43,START,
  13713.                WHERE MGR = 7280 AND JOB = 'CLERK' AND SAL > 950;
  13714.  44,START,
  13715.  
  13716.  45,START,
  13717.  See also:  @, define, commands, menu.
  13718.   1,START WITH,
  13719.  
  13720.   2,START WITH,
  13721.  
  13722.   3,START WITH,
  13723.                               START WITH
  13724.   4,START WITH,
  13725.                                                          SQL clauses
  13726.   5,START WITH,
  13727.  SELECT list  FROM...
  13728.   6,START WITH,
  13729.     WHERE...
  13730.   7,START WITH,
  13731.     CONNECT BY PRIOR expr1 operator expr2     --displays expr1 first
  13732.   8,START WITH,
  13733.     CONNECT BY expr1 operator PRIOR expr2     --displays expr2 first
  13734.   9,START WITH,
  13735.     START WITH condition;                     --not required
  13736.  10,START WITH,
  13737.  
  13738.  11,START WITH,
  13739.  
  13740.  12,START WITH,
  13741.  The START WITH condition specifies which row(s) are the root(s) of
  13742.  13,START WITH,
  13743.  the tree.  To start with each row that meets the WHERE conditions,
  13744.  14,START WITH,
  13745.  omit the START WITH clause.
  13746.  15,START WITH,
  13747.  
  13748.  16,START WITH,
  13749.  
  13750.  17,START WITH,
  13751.  See also: example connect by, conditions, connect by,
  13752.  18,START WITH,
  13753.            tree-structured query, where, commands, menu.
  13754.   1,Scoping Rules,
  13755.  
  13756.   2,Scoping Rules,
  13757.  
  13758.   3,Scoping Rules,
  13759.                              Scoping Rules
  13760.   4,Scoping Rules,
  13761.  
  13762.   5,Scoping Rules,
  13763.  Identifiers (variables, constants, records, cursors, exceptions) are
  13764.   6,Scoping Rules,
  13765.  local to the block in which they are declared, and global to all blocks
  13766.   7,Scoping Rules,
  13767.  contained by that block.  If you re-declare a global identifier in a 
  13768.   8,Scoping Rules,
  13769.  sub-block, the new declaration prevails in that block and in the blocks
  13770.   9,Scoping Rules,
  13771.  it contains.  Statements in a block cannot use the identifier declar-
  13772.  10,Scoping Rules,
  13773.  ations in another block that is at the same level.
  13774.  11,Scoping Rules,
  13775.  
  13776.  12,Scoping Rules,
  13777.  If you've re-declared an identifier in a sub-block, and want to use the
  13778.  13,Scoping Rules,
  13779.  higher block's declaration of that identifier, put a <<label_name>> in
  13780.  14,Scoping Rules,
  13781.  front of the higher block's DECLARE statement, then add that label_name
  13782.  15,Scoping Rules,
  13783.  with a period before the identifier to reference it in the sub-block.
  13784.  16,Scoping Rules,
  13785.  
  13786.  17,Scoping Rules,
  13787.                      <<top>>
  13788.  18,Scoping Rules,
  13789.                      DECLARE
  13790.  19,Scoping Rules,
  13791.                         day  DATE;
  13792.  20,Scoping Rules,
  13793.                      BEGIN
  13794.  21,Scoping Rules,
  13795.                         ...
  13796.  22,Scoping Rules,
  13797.                         DECLARE
  13798.  23,Scoping Rules,
  13799.                            day  DATE;
  13800.  24,Scoping Rules,
  13801.                         BEGIN
  13802.  25,Scoping Rules,
  13803.                            IF day = top.day THEN...
  13804.  26,Scoping Rules,
  13805.  
  13806.  27,Scoping Rules,
  13807.  See also: identifiers, variables, blocks, declare, end, menu.
  13808.   1,Sequences,
  13809.  
  13810.   2,Sequences,
  13811.  
  13812.   3,Sequences,
  13813.                            Sequences
  13814.   4,Sequences,
  13815.  
  13816.   5,Sequences,
  13817.  A sequence is an ORACLE object from which you can generate
  13818.   6,Sequences,
  13819.  unique integers in SQL. Sequence numbers are often used to
  13820.   7,Sequences,
  13821.  create primary keys automatically.  To use a sequence that
  13822.   8,Sequences,
  13823.  you don't own, you must have SELECT privileges.  Sequences
  13824.   9,Sequences,
  13825.  you can access are in data dictionary views USER_SEQUENCES
  13826.  10,Sequences,
  13827.  and ALL_SEQUENCES.  The creator of a sequence sets its:
  13828.  11,Sequences,
  13829.  
  13830.  12,Sequences,
  13831.  Growth -  A sequence may grow constantly, end at a defined
  13832.  13,Sequences,
  13833.            limit, or restart upon reaching a defined limit.
  13834.  14,Sequences,
  13835.  
  13836.  15,Sequences,
  13837.  Increments -  A sequence may generate numbers in ascending
  13838.  16,Sequences,
  13839.            or descending order; the interval can be defined.
  13840.  17,Sequences,
  13841.  
  13842.  18,Sequences,
  13843.  The pseudo-column sequence.NEXTVAL produces the next value
  13844.  19,Sequences,
  13845.  in a sequence; sequence.CURRVAL returns its current value.
  13846.  20,Sequences,
  13847.  
  13848.  21,Sequences,
  13849.  
  13850.  22,Sequences,
  13851.  
  13852.  23,Sequences,
  13853.  See also: keys, data dictionary, nextval, create sequence,
  13854.  24,Sequences,
  13855.            alter sequence, drop sequence, menu.
  13856.   1,Set Operators,
  13857.  
  13858.   2,Set Operators,
  13859.  
  13860.   3,Set Operators,
  13861.                             Set Operators
  13862.   4,Set Operators,
  13863.  
  13864.   5,Set Operators,
  13865.  Set operators merge the results of multiple queries into one result.
  13866.   6,Set Operators,
  13867.  
  13868.   7,Set Operators,
  13869.     Operator      Function in SQL                  Syntax
  13870.   8,Set Operators,
  13871.  ------------------------------------------------------------------------
  13872.   9,Set Operators,
  13873.     UNION         Combines queries to return       SELECT...
  13874.  10,Set Operators,
  13875.                   all distinct rows returned         UNION SELECT...
  13876.  11,Set Operators,
  13877.                   by ANY individual query.
  13878.  12,Set Operators,
  13879.  
  13880.  13,Set Operators,
  13881.     INTERSECT     Combines queries to return       SELECT...
  13882.  14,Set Operators,
  13883.                   all distinct rows returned         INTERSECT SELECT...
  13884.  15,Set Operators,
  13885.                   by EVERY individual query.
  13886.  16,Set Operators,
  13887.  
  13888.  17,Set Operators,
  13889.     MINUS         Combines queries to return       SELECT...
  13890.  18,Set Operators,
  13891.                   all distinct rows returned         MINUS SELECT...
  13892.  19,Set Operators,
  13893.                   by the FIRST query but not
  13894.  20,Set Operators,
  13895.                   the second.
  13896.  21,Set Operators,
  13897.  
  13898.  22,Set Operators,
  13899.  
  13900.  23,Set Operators,
  13901.     See also: example set, query, select, menu.
  13902.   1,Subquery,
  13903.  
  13904.   2,Subquery,
  13905.  
  13906.   3,Subquery,
  13907.                                Subquery
  13908.   4,Subquery,
  13909.  
  13910.   5,Subquery,
  13911.  A subquery is a SELECT statement used as the right-side expression 
  13912.   6,Subquery,
  13913.  within a WHERE clause--a query subordinate to another query.  You
  13914.   7,Subquery,
  13915.  can also put one subquery within another.
  13916.   8,Subquery,
  13917.  
  13918.   9,Subquery,
  13919.             SELECT...WHERE expr operator (SELECT...);
  13920.  10,Subquery,
  13921.             UPDATE...WHERE expr operator (SELECT...);
  13922.  11,Subquery,
  13923.             DELETE...WHERE expr operator (SELECT...);
  13924.  12,Subquery,
  13925.  
  13926.  13,Subquery,
  13927.             SELECT ename FROM emp WHERE cityname IN
  13928.  14,Subquery,
  13929.                (SELECT id FROM city WHERE stateabbr IN
  13930.  15,Subquery,
  13931.                   (SELECT stateabbr FROM state WHERE
  13932.  16,Subquery,
  13933.                      name = 'NEW YORK'));
  13934.  17,Subquery,
  13935.  
  13936.  18,Subquery,
  13937.      SUBQUERY SETS
  13938.  19,Subquery,
  13939.  SQL allows the use of a comparison operator with a multiple-value
  13940.  20,Subquery,
  13941.  subquery if the words ANY, ALL, or SOME are after the operator.
  13942.  21,Subquery,
  13943.  
  13944.  22,Subquery,
  13945.             SELECT ename FROM emp
  13946.  23,Subquery,
  13947.                WHERE job <> 'MANAGER' AND sal > ANY
  13948.  24,Subquery,
  13949.                (SELECT sal FROM emp WHERE job='MANAGER');
  13950.  25,Subquery,
  13951.  
  13952.  26,Subquery,
  13953.  See also: example subquery, select, where, update, delete, comparison,
  13954.  27,Subquery,
  13955.            query, uses of select, menu.
  13956.   1,Substitution,
  13957.  
  13958.   2,Substitution,
  13959.  
  13960.   3,Substitution,
  13961.                                 Substitution
  13962.   4,Substitution,
  13963.  
  13964.   5,Substitution,
  13965.  A substitution variable is a user variable name preceded by one or two
  13966.   6,Substitution,
  13967.  ampersands (&).  When a substitution variable is in a command, SQL*Plus
  13968.   7,Substitution,
  13969.  executes the command as though it contained the value of the substitution
  13970.   8,Substitution,
  13971.  variable, rather than the reference to the variable.
  13972.   9,Substitution,
  13973.  
  13974.  10,Substitution,
  13975.  Example:  If the variable SORTCOL is "JOB", and the variable MYTABLE is
  13976.  11,Substitution,
  13977.            "EMP", SQL*Plus executes the commands:
  13978.  12,Substitution,
  13979.  
  13980.  13,Substitution,
  13981.                SQL> BREAK ON &SORTCOL SQL> SELECT &SORTCOL, SAL
  13982.  14,Substitution,
  13983.                  2  FROM &MYTABLE
  13984.  15,Substitution,
  13985.                  3  ORDER BY &SORTCOL;
  13986.  16,Substitution,
  13987.  
  13988.  17,Substitution,
  13989.            as if they were:  SQL> BREAK ON JOB
  13990.  18,Substitution,
  13991.                              SQL> SELECT JOB, SAL
  13992.  19,Substitution,
  13993.                                2  FROM EMP
  13994.  20,Substitution,
  13995.                                3  ORDER BY JOB;
  13996.  21,Substitution,
  13997.  
  13998.  22,Substitution,
  13999.  
  14000.  23,Substitution,
  14001.  You can use substitution variables anywhere in SQL and SQL*Plus commands,
  14002.  24,Substitution,
  14003.  except as the first word entered at the prompt.  If SQL*Plus finds an
  14004.  25,Substitution,
  14005.  undefined substitution variable in a command, you are asked for its value.
  14006.  26,Substitution,
  14007.  
  14008.  27,Substitution,
  14009.  Example:  If the variable GIVENNAME is undefined and you enter:
  14010.  28,Substitution,
  14011.  
  14012.  29,Substitution,
  14013.                SQL> SELECT * FROM EMP WHERE ENAME = '&GIVENNAME';
  14014.  30,Substitution,
  14015.  
  14016.  31,Substitution,
  14017.            SQL*Plus displays the prompt:
  14018.  32,Substitution,
  14019.  
  14020.  33,Substitution,
  14021.                Enter value for givenname:
  14022.  34,Substitution,
  14023.  
  14024.  35,Substitution,
  14025.  
  14026.  36,Substitution,
  14027.  You can enter any string at the prompt, even with blanks and punctuation.
  14028.  37,Substitution,
  14029.  Quote marks are not needed if they surround the substitution variable in
  14030.  38,Substitution,
  14031.  the command.  SQL*Plus reads your response from the keyboard, even if you
  14032.  39,Substitution,
  14033.  have redirected terminal input or output to a file.  If a terminal is not
  14034.  40,Substitution,
  14035.  available (running the file in batch mode, for example), SQL*Plus uses the
  14036.  41,Substitution,
  14037.  redirected file.  To append characters immediately after a substitution
  14038.  42,Substitution,
  14039.  variable, use a period to separate the variable from the characters:
  14040.  43,Substitution,
  14041.  
  14042.  44,Substitution,
  14043.                SQL> SELECT * FROM EMP WHERE EMPNO='&E.01';
  14044.  45,Substitution,
  14045.                Entering a value for E:  123
  14046.  46,Substitution,
  14047.  
  14048.  47,Substitution,
  14049.                is interpreted as: 
  14050.  48,Substitution,
  14051.                SQL> SELECT * FROM EMP WHERE EMPNO='12301';
  14052.  49,Substitution,
  14053.  
  14054.  50,Substitution,
  14055.  & and &&
  14056.  51,Substitution,
  14057.  
  14058.  52,Substitution,
  14059.  If you use a substitution variable with one ampersand, SQL*Plus does not
  14060.  53,Substitution,
  14061.  implicitly DEFINE the variable when you input a value.  Thus, if SQL*Plus
  14062.  54,Substitution,
  14063.  later executes the same command (or another one with the same substitution
  14064.  55,Substitution,
  14065.  variable), SQL*Plus will prompt you again for the value of the variable.
  14066.  56,Substitution,
  14067.  If you use a substitution variable with two ampersands, the variable is
  14068.  57,Substitution,
  14069.  automatically defined when you input a value.  Thus, if the same command
  14070.  58,Substitution,
  14071.  is executed later in that session, SQL*Plus will not prompt you again for
  14072.  59,Substitution,
  14073.  the value of the variable.
  14074.  60,Substitution,
  14075.  
  14076.  61,Substitution,
  14077.  Example:  A command file named STATS (for calculating subgroup statistics
  14078.  62,Substitution,
  14079.            on a numeric column) contains:
  14080.  63,Substitution,
  14081.  
  14082.  64,Substitution,
  14083.                SELECT &&GROUP_COL, MAX(&&NUMBER_COL)  MAXIMUM,
  14084.  65,Substitution,
  14085.                    MIN(&&NUMBER_COL) MINIMUM,
  14086.  66,Substitution,
  14087.                    SUM(&&NUMBER_COL) TOTAL,
  14088.  67,Substitution,
  14089.                    AVG(&&NUMBER_COL) AVERAGE
  14090.  68,Substitution,
  14091.                FROM &TABLE
  14092.  69,Substitution,
  14093.                GROUP BY &&GROUP_COL;
  14094.  70,Substitution,
  14095.  
  14096.  71,Substitution,
  14097.            When you run this file, SQL*Plus prompts you for the values, by
  14098.  72,Substitution,
  14099.            name, before running the file:
  14100.  73,Substitution,
  14101.  
  14102.  74,Substitution,
  14103.                Enter value for group_col: PROJNO
  14104.  75,Substitution,
  14105.                Enter value for number_col: SAL
  14106.  76,Substitution,
  14107.                Enter value for table: EMP
  14108.  77,Substitution,
  14109.  
  14110.  78,Substitution,
  14111.            SQL*Plus runs the following query:
  14112.  79,Substitution,
  14113.  
  14114.  80,Substitution,
  14115.                SELECT PROJNO, MAX(SAL)  MAXIMUM,
  14116.  81,Substitution,
  14117.                    MIN(SAL) MINIMUM,
  14118.  82,Substitution,
  14119.                    SUM(SAL) TOTAL,
  14120.  83,Substitution,
  14121.                    AVG(SAL) AVERAGE
  14122.  84,Substitution,
  14123.                FROM EMP
  14124.  85,Substitution,
  14125.                GROUP BY PROJNO;
  14126.  86,Substitution,
  14127.  
  14128.  87,Substitution,
  14129.            If you run the query again during the same session, you will be
  14130.  88,Substitution,
  14131.            prompted for TABLE (its name has a single ampersand) but not for
  14132.  89,Substitution,
  14133.            GROUP_COL or NUMBER_COL (their names have double ampersands).
  14134.  90,Substitution,
  14135.  
  14136.  91,Substitution,
  14137.  
  14138.  92,Substitution,
  14139.  Restrictions on Substitution
  14140.  93,Substitution,
  14141.  
  14142.  94,Substitution,
  14143.  You can't use substitution variables or parameters in the editing commands
  14144.  95,Substitution,
  14145.  APPEND, CHANGE, DEL, and INPUT, nor in other commands where substitution
  14146.  96,Substitution,
  14147.  would be meaningless, like HELP, REMARK, and TIMING.  APPEND, CHANGE, and
  14148.  97,Substitution,
  14149.  INPUT treat text beginning with & or && like any other text string.
  14150.  98,Substitution,
  14151.  
  14152.  99,Substitution,
  14153.  These SET variables affect substitution variables and parameters:
  14154. 100,Substitution,
  14155.  
  14156. 101,Substitution,
  14157.  SET SCAN      turns substitution on and off.
  14158. 102,Substitution,
  14159.  
  14160. 103,Substitution,
  14161.  SET DEFINE    defines the substitution character.  & is the default.
  14162. 104,Substitution,
  14163.  
  14164. 105,Substitution,
  14165.  SET ESCAPE    defines an escape character to use before the substitution
  14166. 106,Substitution,
  14167.                character.  The escape character instructs SQL*Plus to treat
  14168. 107,Substitution,
  14169.                the substitution character as an ordinary character, not a
  14170. 108,Substitution,
  14171.                variable substitution request.  \ is the default character.
  14172. 109,Substitution,
  14173.  
  14174. 110,Substitution,
  14175.  SET VERIFY ON shows each line of the file before and after substitution.
  14176. 111,Substitution,
  14177.  
  14178. 112,Substitution,
  14179.  SET CONCAT    defines the character between the name of a substitution
  14180. 113,Substitution,
  14181.                variable or parameter and characters immediately after the
  14182. 114,Substitution,
  14183.                variable or parameter (. is the default).  See SET.
  14184. 115,Substitution,
  14185.  
  14186. 116,Substitution,
  14187.  See also: &, commands, menu.
  14188.   1,Synonyms,
  14189.  
  14190.   2,Synonyms,
  14191.  
  14192.   3,Synonyms,
  14193.                              Synonyms
  14194.   4,Synonyms,
  14195.  
  14196.   5,Synonyms,
  14197.  A synonym is an additional name for a table, view, or sequence.
  14198.   6,Synonyms,
  14199.  Use a synonym for security and convenience to access a table or
  14200.   7,Synonyms,
  14201.  view without needing to name the owner or the database in which
  14202.   8,Synonyms,
  14203.  the table or view exists.   A synonym is made public or private
  14204.   9,Synonyms,
  14205.  upon creation.   The name of a private synonym must be distinct
  14206.  10,Synonyms,
  14207.  from the names of other objects owned by the same user. The SQL
  14208.  11,Synonyms,
  14209.  statement CREATE SYNONYM is used to produce synonyms.
  14210.  12,Synonyms,
  14211.  
  14212.  13,Synonyms,
  14213.  
  14214.  14,Synonyms,
  14215.  
  14216.  15,Synonyms,
  14217.  See also: table, view, sequence, create synonym, commands, menu.
  14218.   1,TIMING,
  14219.  
  14220.   2,TIMING,
  14221.  
  14222.   3,TIMING,
  14223.                                     TIMING
  14224.   4,TIMING,
  14225.  
  14226.   5,TIMING,
  14227.  TIMI[NG] [START text|SHOW|STOP]
  14228.   6,TIMING,
  14229.  
  14230.   7,TIMING,
  14231.  TIMING records timing data for an elapsed time period, lists the current
  14232.   8,TIMING,
  14233.  timing area's title and timing data, or lists the number of active timing
  14234.   9,TIMING,
  14235.  areas.
  14236.  10,TIMING,
  14237.  
  14238.  11,TIMING,
  14239.      START text
  14240.  12,TIMING,
  14241.          sets up a timing area and makes text its title.  To have more than
  14242.  13,TIMING,
  14243.          one active timing area, START additional areas before STOPping the
  14244.  14,TIMING,
  14245.          first; SQL*Plus nests each new area within the preceding one.  The
  14246.  15,TIMING,
  14247.          area most recently STARTed is the current timing area.
  14248.  16,TIMING,
  14249.  
  14250.  17,TIMING,
  14251.      SHOW
  14252.  18,TIMING,
  14253.          shows the current timing area's title and timing data.
  14254.  19,TIMING,
  14255.  
  14256.  20,TIMING,
  14257.      STOP
  14258.  21,TIMING,
  14259.          shows the current timing area's title and timing data, then erases
  14260.  22,TIMING,
  14261.          the timing area.  If other timing areas are active, the next most
  14262.  23,TIMING,
  14263.          recently STARTed area becomes the current timing area.  Use the
  14264.  24,TIMING,
  14265.          CLEAR command's TIMING clause to delete all timing areas.  Enter
  14266.  25,TIMING,
  14267.          TIMING with no clauses to list the number of active timing areas.
  14268.  26,TIMING,
  14269.  
  14270.  27,TIMING,
  14271.  
  14272.  28,TIMING,
  14273.  You can use this data to do a performance analysis on commands or blocks
  14274.  29,TIMING,
  14275.  run during the period.  SET TIMING ON automatically displays timing data
  14276.  30,TIMING,
  14277.  after each SQL command or PL/SQL block you run.
  14278.  31,TIMING,
  14279.  
  14280.  32,TIMING,
  14281.  Examples: To create a timing area named SQL_AREA, enter:
  14282.  33,TIMING,
  14283.  
  14284.  34,TIMING,
  14285.                SQL> TIMING START SQL_AREA
  14286.  35,TIMING,
  14287.  
  14288.  36,TIMING,
  14289.            To list the current timing area's title and accumulated time:
  14290.  37,TIMING,
  14291.  
  14292.  38,TIMING,
  14293.                SQL> TIMING SHOW
  14294.  39,TIMING,
  14295.  
  14296.  40,TIMING,
  14297.            To list the current timing area's title and accumulated time,
  14298.  41,TIMING,
  14299.            and remove the timing area, enter:
  14300.  42,TIMING,
  14301.  
  14302.  43,TIMING,
  14303.                SQL> TIMING STOP
  14304.  44,TIMING,
  14305.  
  14306.  45,TIMING,
  14307.  See also:  clear, show, set, start, commands, menu.
  14308.   1,TTITLE,
  14309.  
  14310.   2,TTITLE,
  14311.  
  14312.   3,TTITLE,
  14313.                                    TTITLE
  14314.   4,TTITLE,
  14315.  
  14316.   5,TTITLE,
  14317.  TTI[TLE] [printspec [text|variable] ...] | [OFF|ON]
  14318.   6,TTITLE,
  14319.  
  14320.   7,TTITLE,
  14321.  where printspec is one or more of the clauses:
  14322.   8,TTITLE,
  14323.  
  14324.   9,TTITLE,
  14325.          COL n          LE[FT]        BOLD
  14326.  10,TTITLE,
  14327.          S[KIP] [n]     CE[NTER]      FORMAT char
  14328.  11,TTITLE,
  14329.          TAB n          R[IGHT]
  14330.  12,TTITLE,
  14331.  
  14332.  13,TTITLE,
  14333.  TTITLE places and formats a title at the top of each report page.  Enter
  14334.  14,TTITLE,
  14335.  TTITLE with no clause to list its current definition.  See OLD TTITLE for
  14336.  15,TTITLE,
  14337.  a description of the old form, compatible with UFI.
  14338.  16,TTITLE,
  14339.  
  14340.  17,TTITLE,
  14341.  If you don't enter a printspec clause before the first occurrence of text,
  14342.  18,TTITLE,
  14343.  TTITLE left-justifies the text.  TTITLE's terms and clauses also apply to
  14344.  19,TTITLE,
  14345.  the BTITLE command.
  14346.  20,TTITLE,
  14347.  
  14348.  21,TTITLE,
  14349.      text
  14350.  22,TTITLE,
  14351.          is the title text.  Enter text in single quotes if you wish to
  14352.  23,TTITLE,
  14353.          place more than one word on a single line.
  14354.  24,TTITLE,
  14355.  
  14356.  25,TTITLE,
  14357.      variable
  14358.  26,TTITLE,
  14359.          is a user variable or any of these system-maintained values:
  14360.  27,TTITLE,
  14361.  
  14362.  28,TTITLE,
  14363.               SQL.LNO       current line number
  14364.  29,TTITLE,
  14365.               SQL.PNO       current page number
  14366.  30,TTITLE,
  14367.               SQL.RELEASE   current ORACLE release number
  14368.  31,TTITLE,
  14369.               SQL.SQLCODE   current error code
  14370.  32,TTITLE,
  14371.               SQL.USER      current username
  14372.  33,TTITLE,
  14373.  
  14374.  34,TTITLE,
  14375.          To print one of these values, reference the appropriate variable
  14376.  35,TTITLE,
  14377.          in the title.  You can format variable with the FORMAT clause.
  14378.  36,TTITLE,
  14379.  
  14380.  37,TTITLE,
  14381.      OFF turns the title off (suppresses its display) without affecting
  14382.  38,TTITLE,
  14383.          its definition.
  14384.  39,TTITLE,
  14385.  
  14386.  40,TTITLE,
  14387.      ON  turns the title on (restores its display).  When you define a
  14388.  41,TTITLE,
  14389.          top title, SQL*Plus automatically sets TTITLE to ON.
  14390.  42,TTITLE,
  14391.  
  14392.  43,TTITLE,
  14393.      COL n
  14394.  44,TTITLE,
  14395.          indents to column n of the current line (backward if column n has
  14396.  45,TTITLE,
  14397.          been passed).  "Column" here is print position, not table column.
  14398.  46,TTITLE,
  14399.  
  14400.  47,TTITLE,
  14401.      S[KIP] [n]
  14402.  48,TTITLE,
  14403.          skips to the start of a new line n times; if n omitted, one time.
  14404.  49,TTITLE,
  14405.          If n = 0, skips backward to the start of the current line.
  14406.  50,TTITLE,
  14407.  
  14408.  51,TTITLE,
  14409.      TAB n
  14410.  52,TTITLE,
  14411.          skips forward n columns (backward if you enter a negative value
  14412.  53,TTITLE,
  14413.          for n).  "Column" here is print position, not table column.
  14414.  54,TTITLE,
  14415.  
  14416.  55,TTITLE,
  14417.      LE[FT], CE[NTER], and R[IGHT]
  14418.  56,TTITLE,
  14419.          aligns data left, center, or right on the current line.  SQL*Plus
  14420.  57,TTITLE,
  14421.          aligns the following data items as a group, up to the end of the
  14422.  58,TTITLE,
  14423.          printspec or the next LEFT, CENTER, RIGHT, or COL command.  CENTER
  14424.  59,TTITLE,
  14425.          and RIGHT use the SET LINESIZE value to calculate the position of
  14426.  60,TTITLE,
  14427.          the data item that follows.
  14428.  61,TTITLE,
  14429.  
  14430.  62,TTITLE,
  14431.      BOLD
  14432.  63,TTITLE,
  14433.          prints data in bold print.  SQL*Plus represents bold print on your
  14434.  64,TTITLE,
  14435.          terminal by repeating the data on three consecutive lines.
  14436.  65,TTITLE,
  14437.  
  14438.  66,TTITLE,
  14439.      FORMAT char
  14440.  67,TTITLE,
  14441.          specifies a format model that determines the format data items to
  14442.  68,TTITLE,
  14443.          the next FORMAT clause or the end of the command.  The format
  14444.  69,TTITLE,
  14445.          model must be a char constant like A10 or $999, not a variable.
  14446.  70,TTITLE,
  14447.          See COLUMN FORMAT for more information on formatting.
  14448.  71,TTITLE,
  14449.  
  14450.  72,TTITLE,
  14451.          If the datatype of the format model does not match the datatype of
  14452.  73,TTITLE,
  14453.          a given data item, the FORMAT clause has no effect on that item.
  14454.  74,TTITLE,
  14455.  
  14456.  75,TTITLE,
  14457.          If no FORMAT model precedes a given data item, SQL*Plus prints
  14458.  76,TTITLE,
  14459.          NUMBER values in the format specified by SET NUMFORMAT or, if you
  14460.  77,TTITLE,
  14461.          have not used SET NUMFORMAT, the default format.  SQL*Plus prints
  14462.  78,TTITLE,
  14463.          DATE values in the default format.
  14464.  79,TTITLE,
  14465.  
  14466.  80,TTITLE,
  14467.  
  14468.  81,TTITLE,
  14469.  SQL*Plus interprets TTITLE in the new form if a valid printspec clause
  14470.  82,TTITLE,
  14471.  (LEFT, SKIP, COL, etc.) immediately follows the command name.  See COLUMN
  14472.  83,TTITLE,
  14473.  NEW_VALUE for information on printing column and DATE values in the top
  14474.  84,TTITLE,
  14475.  title.  You can use any number of constants and variables in a printspec.
  14476.  85,TTITLE,
  14477.  SQL*Plus displays the constants and variables in the order specified,
  14478.  86,TTITLE,
  14479.  positioning and formatting each constant or variable by the printspec
  14480.  87,TTITLE,
  14481.  clause that precedes it.
  14482.  88,TTITLE,
  14483.  
  14484.  89,TTITLE,
  14485.  Examples: To define "Monthly Analysis" as the top title and left-align it,
  14486.  90,TTITLE,
  14487.            to center the date, to right-align the page number with a three
  14488.  91,TTITLE,
  14489.            digit format, and to display "Date in Thousands" bold in the
  14490.  92,TTITLE,
  14491.            center of the next line, enter:
  14492.  93,TTITLE,
  14493.  
  14494.  94,TTITLE,
  14495.                SQL> TTITLE LEFT 'Monthly Analysis' CENTER '11 Mar 88' -
  14496.  95,TTITLE,
  14497.                   > RIGHT 'Page:' FORMAT 999 SQL.PNO SKIP CENTER BOLD -
  14498.  96,TTITLE,
  14499.                   > 'Data in Thousands'
  14500.  97,TTITLE,
  14501.  
  14502.  98,TTITLE,
  14503.            The following title results:
  14504.  99,TTITLE,
  14505.  
  14506. 100,TTITLE,
  14507.                Monthly Analysis            11 Mar 88             Page: 1
  14508. 101,TTITLE,
  14509.                                        Data in Thousands
  14510. 102,TTITLE,
  14511.  
  14512. 103,TTITLE,
  14513.            To suppress the top title display without changing its
  14514. 104,TTITLE,
  14515.            definition, enter:
  14516. 105,TTITLE,
  14517.  
  14518. 106,TTITLE,
  14519.                SQL> TTITLE OFF
  14520. 107,TTITLE,
  14521.  
  14522. 108,TTITLE,
  14523.  See also:  btitle, set, commands, menu.
  14524.   1,Tables,
  14525.  
  14526.   2,Tables,
  14527.  
  14528.   3,Tables,
  14529.                       Tables, Columns, and Rows
  14530.   4,Tables,
  14531.  
  14532.   5,Tables,
  14533.  Database data is stored in tables, made of columns and rows.
  14534.   6,Tables,
  14535.  A table with one column holds a list of items.  A table with
  14536.   7,Tables,
  14537.  two or more columns interrelates the information held by the
  14538.   8,Tables,
  14539.  columns of each row.
  14540.   9,Tables,
  14541.  
  14542.  10,Tables,
  14543.  Each column represents a single attribute for each row.  Each
  14544.  11,Tables,
  14545.  row stores the data of one record with a unique ROWID pseudo-
  14546.  12,Tables,
  14547.  column.  One or more columns of a table may serve as primary,
  14548.  13,Tables,
  14549.  foreign, or unique keys. Tables and columns are referenced by
  14550.  14,Tables,
  14551.  their identifiers: emp.sal
  14552.  15,Tables,
  14553.  
  14554.  16,Tables,
  14555.  
  14556.  17,Tables,
  14557.  
  14558.  18,Tables,
  14559.  See also: pseudo-columns, identifiers, keys, create table,
  14560.  19,Tables,
  14561.            alter table, drop table, constraints, menu.
  14562.   1,Transactions,
  14563.  
  14564.   2,Transactions,
  14565.  
  14566.   3,Transactions,
  14567.                             Transactions
  14568.   4,Transactions,
  14569.  
  14570.   5,Transactions,
  14571.  A transaction in SQL is a series of statements treated as a logical
  14572.   6,Transactions,
  14573.  unit of work.  A transaction is either made permanent with a COMMIT
  14574.   7,Transactions,
  14575.  or completely undone with a ROLLBACK to a SAVEPOINT.  A transaction
  14576.   8,Transactions,
  14577.  begins with the first statement executed, or the first one executed
  14578.   9,Transactions,
  14579.  since the last COMMIT or ROLLBACK.  It ends with the next COMMIT or
  14580.  10,Transactions,
  14581.  ROLLBACK statement.
  14582.  11,Transactions,
  14583.  
  14584.  12,Transactions,
  14585.  You may wish to insert a SET TRANSACTION READ ONLY statement at the
  14586.  13,Transactions,
  14587.  beginning of a transaction to prevent changes by other users.
  14588.  14,Transactions,
  14589.  
  14590.  15,Transactions,
  14591.  
  14592.  16,Transactions,
  14593.  
  14594.  17,Transactions,
  14595.  See also: commit, rollback, savepoint, set transaction, menu.
  14596.   1,Tree-Structured Query,
  14597.  
  14598.   2,Tree-Structured Query,
  14599.  
  14600.   3,Tree-Structured Query,
  14601.                        Tree-Structured Query
  14602.   4,Tree-Structured Query,
  14603.  
  14604.   5,Tree-Structured Query,
  14605.  A tree-structured query uses the CONNECT BY clause to display rows
  14606.   6,Tree-Structured Query,
  14607.  in a hierarchical order. Beginning with the root node named in the
  14608.   7,Tree-Structured Query,
  14609.  START WITH clause, the query inspects each branch connected to the
  14610.   8,Tree-Structured Query,
  14611.  root. For example, the emp table lists a manager for each employee
  14612.   9,Tree-Structured Query,
  14613.  except KING, the president:
  14614.  10,Tree-Structured Query,
  14615.  
  14616.  11,Tree-Structured Query,
  14617.  Level 1               KING  (the root node)
  14618.  12,Tree-Structured Query,
  14619.              |-----------|----------------------|
  14620.  13,Tree-Structured Query,
  14621.              |           |                      |
  14622.  14,Tree-Structured Query,
  14623.  Level 2   CLARK       JONES                  BLAKE
  14624.  15,Tree-Structured Query,
  14625.              |       |---|---|     |-----|------|-------|-------|
  14626.  16,Tree-Structured Query,
  14627.              |       |       |     |     |      |       |       |
  14628.  17,Tree-Structured Query,
  14629.  Level 3   MILLER  SCOTT   FORD  ALLEN  WARD  MARTIN  TURNER  JAMES
  14630.  18,Tree-Structured Query,
  14631.                      |       |
  14632.  19,Tree-Structured Query,
  14633.                      |       |
  14634.  20,Tree-Structured Query,
  14635.  Level 4           ADAMS   SMITH
  14636.  21,Tree-Structured Query,
  14637.  
  14638.  22,Tree-Structured Query,
  14639.  
  14640.  23,Tree-Structured Query,
  14641.  
  14642.  24,Tree-Structured Query,
  14643.  See also: example connect by, select, query, uses of select, menu.
  14644.   1,UNDEFINE,
  14645.  
  14646.   2,UNDEFINE,
  14647.  
  14648.   3,UNDEFINE,
  14649.                                UNDEFINE
  14650.   4,UNDEFINE,
  14651.  
  14652.   5,UNDEFINE,
  14653.  UNDEF[INE] variable
  14654.   6,UNDEFINE,
  14655.  
  14656.   7,UNDEFINE,
  14657.  UNDEFINE deletes a given user variable that you defined either explicitly
  14658.   8,UNDEFINE,
  14659.  (with the DEFINE command), or implicitly (with a START command argument).
  14660.   9,UNDEFINE,
  14661.  
  14662.  10,UNDEFINE,
  14663.      variable
  14664.  11,UNDEFINE,
  14665.          is the name of the user variable you wish to delete.
  14666.  12,UNDEFINE,
  14667.  
  14668.  13,UNDEFINE,
  14669.  
  14670.  14,UNDEFINE,
  14671.  Example:  To undefine a user variable named POS, enter:
  14672.  15,UNDEFINE,
  14673.  
  14674.  16,UNDEFINE,
  14675.                SQL> UNDEFINE POS
  14676.  17,UNDEFINE,
  14677.  
  14678.  18,UNDEFINE,
  14679.  See also:  define, start, @, commands, menu.
  14680.   1,UPDATE,
  14681.  
  14682.   2,UPDATE,
  14683.  
  14684.   3,UPDATE,
  14685.                                UPDATE
  14686.   4,UPDATE,
  14687.                                             SQL and PL/SQL statement
  14688.   5,UPDATE,
  14689.  
  14690.   6,UPDATE,
  14691.  UPDATE table/view_name SET
  14692.   7,UPDATE,
  14693.      column_name = sql_expression                       --SQL option
  14694.   8,UPDATE,
  14695.      column_name = (one_value_SELECT_statement)         --SQL option
  14696.   9,UPDATE,
  14697.      (column_name, column_name,...) = SELECT_statement  --SQL option
  14698.  10,UPDATE,
  14699.    WHERE_clause;
  14700.  11,UPDATE,
  14701.    WHERE CURRENT OF cursor_name;                     --PL/SQL option
  14702.  12,UPDATE,
  14703.  
  14704.  13,UPDATE,
  14705.  UPDATE replaces the values in rows of one or more specified columns
  14706.  14,UPDATE,
  14707.  with the values from a SQL expression or a SELECT statement. SELECT
  14708.  15,UPDATE,
  14709.  must return at least one row, and every column to the left of the =
  14710.  16,UPDATE,
  14711.  sign.  SELECT may not contain an INTO clause.  Use the WHERE clause
  14712.  17,UPDATE,
  14713.  to specify conditions rows must meet in order to be updated; if you
  14714.  18,UPDATE,
  14715.  omit the WHERE clause, all rows are updated.
  14716.  19,UPDATE,
  14717.  
  14718.  20,UPDATE,
  14719.  In PL/SQL, WHERE CURRENT OF updates the current row.
  14720.  21,UPDATE,
  14721.  
  14722.  22,UPDATE,
  14723.  
  14724.  23,UPDATE,
  14725.  See also: example rollback, cursors, where current of, sql% cursor,
  14726.  24,UPDATE,
  14727.            example where current of, select, commands, menu.
  14728.   1,User ID,
  14729.  
  14730.   2,User ID,
  14731.  
  14732.   3,User ID,
  14733.                           User ID
  14734.   4,User ID,
  14735.  
  14736.   5,User ID,
  14737.  A user is identified by a name and a password that gives access
  14738.   6,User ID,
  14739.  to the database.  A user may be the owner of tables, views, and
  14740.   7,User ID,
  14741.  sequences and may be granted SELECT, INSERT, DELETE, and UPDATE
  14742.   8,User ID,
  14743.  privileges for tables, views, and sequences owned by others.  A
  14744.   9,User ID,
  14745.  user with DBA privileges uses the GRANT statement to create user
  14746.  10,User ID,
  14747.  accesses and privileges.
  14748.  11,User ID,
  14749.  
  14750.  12,User ID,
  14751.  
  14752.  13,User ID,
  14753.  
  14754.  14,User ID,
  14755.   See also: grant, select, insert, delete, update, dba, menu.
  14756.   1,Uses of SELECT,
  14757.  
  14758.   2,Uses of SELECT,
  14759.  
  14760.   3,Uses of SELECT,
  14761.                            Uses of SELECT
  14762.   4,Uses of SELECT,
  14763.  
  14764.   5,Uses of SELECT,
  14765.  The SELECT statement shows the syntax of clauses used in SELECT
  14766.   6,Uses of SELECT,
  14767.  and other SQL statements.  The topics below provide information
  14768.   7,Uses of SELECT,
  14769.  on some of the many uses of the SELECT statement.  To display a
  14770.   8,Uses of SELECT,
  14771.  topic, enter help and a space, then part or all of the topic
  14772.   9,Uses of SELECT,
  14773.  name.
  14774.  10,Uses of SELECT,
  14775.  
  14776.  11,Uses of SELECT,
  14777.          select list               correlated subquery
  14778.  12,Uses of SELECT,
  14779.  
  14780.  13,Uses of SELECT,
  14781.          join (simple)             distributed query
  14782.  14,Uses of SELECT,
  14783.  
  14784.  15,Uses of SELECT,
  14785.          outer join                tree-structured query
  14786.  16,Uses of SELECT,
  14787.  
  14788.  17,Uses of SELECT,
  14789.          query                     select into (PL/SQL)
  14790.  18,Uses of SELECT,
  14791.  
  14792.  19,Uses of SELECT,
  14793.          subquery                  cursors (PL/SQL)
  14794.  20,Uses of SELECT,
  14795.  
  14796.  21,Uses of SELECT,
  14797.  
  14798.  22,Uses of SELECT,
  14799.  
  14800.  23,Uses of SELECT,
  14801.  See also: select, commands, examples, menu.
  14802.   1,VALIDATE INDEX,
  14803.  
  14804.   2,VALIDATE INDEX,
  14805.  
  14806.   3,VALIDATE INDEX,
  14807.                                VALIDATE INDEX
  14808.   4,VALIDATE INDEX,
  14809.                                                             SQL statement
  14810.   5,VALIDATE INDEX,
  14811.  VALIDATE INDEX user.index
  14812.   6,VALIDATE INDEX,
  14813.  
  14814.   7,VALIDATE INDEX,
  14815.  
  14816.   8,VALIDATE INDEX,
  14817.  VALIDATE INDEX verifies that each index entry points to the correct data
  14818.   9,VALIDATE INDEX,
  14819.  block.  It does not confirm that each row has an appropriate index entry.
  14820.  10,VALIDATE INDEX,
  14821.  If ORACLE doesn't give a message that the index has been validated, drop
  14822.  11,VALIDATE INDEX,
  14823.  and recreate the index.
  14824.  12,VALIDATE INDEX,
  14825.  
  14826.  13,VALIDATE INDEX,
  14827.  
  14828.  14,VALIDATE INDEX,
  14829.  See also: create index, alter index, commands, menu.
  14830.   1,Variables,
  14831.  
  14832.   2,Variables,
  14833.  
  14834.   3,Variables,
  14835.                             Variables
  14836.   4,Variables,
  14837.  
  14838.   5,Variables,
  14839.  Use variables to store the results of a query, or to calculate
  14840.   6,Variables,
  14841.  values to insert into tables. You can declare a variable to be
  14842.   7,Variables,
  14843.  of any SQL or PL/SQL datatype: NUMBER, CHAR, DATE, or BOOLEAN.
  14844.   8,Variables,
  14845.  Examples: balance NUMBER(5,2);  wkphone CHAR(12);  sex BOOLEAN
  14846.   9,Variables,
  14847.  
  14848.  10,Variables,
  14849.  There are two ways you can assign values to a variable:
  14850.  11,Variables,
  14851.  
  14852.  12,Variables,
  14853.       - use := (the assignment operator)
  14854.  13,Variables,
  14855.                discount := price * 0.15
  14856.  14,Variables,
  14857.  
  14858.  15,Variables,
  14859.       - SELECT or FETCH table values INTO a variable:
  14860.  16,Variables,
  14861.                SELECT price * 0.15 INTO discount FROM pricelist
  14862.  17,Variables,
  14863.                WHERE stockdate <= SYSDATE - 60
  14864.  18,Variables,
  14865.  
  14866.  19,Variables,
  14867.  To declare a constant, put CONSTANT after the name and assign
  14868.  20,Variables,
  14869.  its value immediately:   discount CONSTANT NUMBER(2,2) := 0.15;
  14870.  21,Variables,
  14871.  
  14872.  22,Variables,
  14873.  
  14874.  23,Variables,
  14875.  See also: declare, number, char, date, boolean, select into,
  14876.  24,Variables,
  14877.            fetch, commands, menu.
  14878.   1,Views,
  14879.  
  14880.   2,Views,
  14881.  
  14882.   3,Views,
  14883.                          Views (and Indexes)
  14884.   4,Views,
  14885.  
  14886.   5,Views,
  14887.  A view contains no data, but provides a representation of data in
  14888.   6,Views,
  14889.  one or more tables (base tables) or other views.  Views let you:
  14890.   7,Views,
  14891.  
  14892.   8,Views,
  14893.      - Restrict access to the data in some columns and/or rows.
  14894.   9,Views,
  14895.      - Hide data complexity--you can use a single view to access
  14896.  10,Views,
  14897.          the information in several tables.
  14898.  11,Views,
  14899.      - Reduce syntactic complexity--a view of data from multiple
  14900.  12,Views,
  14901.          tables can return information without join operations.
  14902.  13,Views,
  14903.      - Present data from alternative perspectives--you can rename
  14904.  14,Views,
  14905.          view columns without changing base table column names.
  14906.  15,Views,
  14907.  
  14908.  16,Views,
  14909.  An index provides quick access to rows; SQL commands that process
  14910.  17,Views,
  14911.  less than 25% of a table's rows will perform faster with an index.
  14912.  18,Views,
  14913.  
  14914.  19,Views,
  14915.  A unique index guarantees the uniqueness of rows in a table by not
  14916.  20,Views,
  14917.  allowing duplicates in one of the columns (the primary key).
  14918.  21,Views,
  14919.  
  14920.  22,Views,
  14921.  
  14922.  23,Views,
  14923.  See also: tables, keys, create view, create index, menu.
  14924.   1,WHENEVER SQLERROR,
  14925.  
  14926.   2,WHENEVER SQLERROR,
  14927.  
  14928.   3,WHENEVER SQLERROR,
  14929.                             WHENEVER SQLERROR
  14930.   4,WHENEVER SQLERROR,
  14931.  
  14932.   5,WHENEVER SQLERROR,
  14933.  WHENEVER SQLERROR {EXIT [SUCCESS|FAILURE|WARNING|n|variable]|CONTINUE}
  14934.   6,WHENEVER SQLERROR,
  14935.  
  14936.   7,WHENEVER SQLERROR,
  14937.  WHENEVER SQLERROR exits SQL*Plus if a SQL command or PL/SQL block causes
  14938.   8,WHENEVER SQLERROR,
  14939.  an error.
  14940.   9,WHENEVER SQLERROR,
  14941.  
  14942.  10,WHENEVER SQLERROR,
  14943.      EXIT [SUCCESS | FAILURE | WARNING | n | variable]
  14944.  11,WHENEVER SQLERROR,
  14945.          directs SQL*Plus to commit pending changes to the database and
  14946.  12,WHENEVER SQLERROR,
  14947.          exit when a SQL error is detected.  The EXIT clause has the syntax
  14948.  13,WHENEVER SQLERROR,
  14949.          of the EXIT command.  SQL*Plus command errors don't cause an exit.
  14950.  14,WHENEVER SQLERROR,
  14951.  
  14952.  15,WHENEVER SQLERROR,
  14953.      CONTINUE
  14954.  16,WHENEVER SQLERROR,
  14955.          turns off the EXIT option.
  14956.  17,WHENEVER SQLERROR,
  14957.  
  14958.  18,WHENEVER SQLERROR,
  14959.  Examples: These commands cause an exit and display the SQL error code if
  14960.  19,WHENEVER SQLERROR,
  14961.            a SQL UPDATE command fails and skips the COPY command:
  14962.  20,WHENEVER SQLERROR,
  14963.  
  14964.  21,WHENEVER SQLERROR,
  14965.                SQL> GET RAISE
  14966.  22,WHENEVER SQLERROR,
  14967.                  1  WHENEVER SQLERROR EXIT SQL.SQLCODE
  14968.  23,WHENEVER SQLERROR,
  14969.                  2  UPDATE EMP SET SAL = SAL*1.1
  14970.  24,WHENEVER SQLERROR,
  14971.                  3  COPY TO SCOTT/TIGER@D:BETHESDA -
  14972.  25,WHENEVER SQLERROR,
  14973.                  4  REPLACE EMP -
  14974.  26,WHENEVER SQLERROR,
  14975.                  5  USING SELECT * FROM EMP
  14976.  27,WHENEVER SQLERROR,
  14977.                  6  WHENEVER SQLERROR CONTINUE
  14978.  28,WHENEVER SQLERROR,
  14979.  
  14980.  29,WHENEVER SQLERROR,
  14981.  See also:  example error handling, exit, commands, menu.
  14982.   1,WHERE,
  14983.  
  14984.   2,WHERE,
  14985.                              WHERE
  14986.   3,WHERE,
  14987.                                                          SQL clause
  14988.   4,WHERE,
  14989.  
  14990.   5,WHERE,
  14991.  SELECT ...              UPDATE ...              DELETE ...
  14992.   6,WHERE,
  14993.     WHERE condition         WHERE condition         WHERE condition
  14994.   7,WHERE,
  14995.  
  14996.   8,WHERE,
  14997.  
  14998.   9,WHERE,
  14999.  Based on the set of conditions specified, the WHERE clause decides
  15000.  10,WHERE,
  15001.  which rows in a table to SELECT, UPDATE, or DELETE.  The condition
  15002.  11,WHERE,
  15003.  contains the name of a column, a comparison operator, and criteria
  15004.  12,WHERE,
  15005.  of the same datatype as the column.  You may use logical operators
  15006.  13,WHERE,
  15007.  in a condition as well-- NOT reverses the meaning of the criteria;
  15008.  14,WHERE,
  15009.  AND requires that several criteria be met; OR picks rows that meet
  15010.  15,WHERE,
  15011.  any one criteria in a list.  For example, to find clients who have
  15012.  16,WHERE,
  15013.  balances over $100 overdue 90 days or more:
  15014.  17,WHERE,
  15015.  
  15016.  18,WHERE,
  15017.  SELECT * FROM clients WHERE bal > 100 AND SYSDATE - duedate >= 90;
  15018.  19,WHERE,
  15019.  
  15020.  20,WHERE,
  15021.  
  15022.  21,WHERE,
  15023.  See also: subquery, select, update, delete, conditions, comparison,
  15024.  22,WHERE,
  15025.            logical operators, commands, menu.
  15026.   1,WHERE CURRENT OF,
  15027.  
  15028.   2,WHERE CURRENT OF,
  15029.  
  15030.   3,WHERE CURRENT OF,
  15031.                          WHERE CURRENT OF
  15032.   4,WHERE CURRENT OF,
  15033.                                                    PL/SQL clause
  15034.   5,WHERE CURRENT OF,
  15035.  
  15036.   6,WHERE CURRENT OF,
  15037.  Use the WHERE CURRENT OF cursor_name clause in a PL/SQL program
  15038.   7,WHERE CURRENT OF,
  15039.  to UPDATE or DELETE the current row--the one last accessed with
  15040.   8,WHERE CURRENT OF,
  15041.  a FETCH statement; the named cursor must be open and positioned
  15042.   9,WHERE CURRENT OF,
  15043.  on a row. To use WHERE CURRENT OF, FOR UPDATE OF must have been
  15044.  10,WHERE CURRENT OF,
  15045.  used in the declaration of the cursor's query.
  15046.  11,WHERE CURRENT OF,
  15047.  
  15048.  12,WHERE CURRENT OF,
  15049.  
  15050.  13,WHERE CURRENT OF,
  15051.  The implicit SQL% cursor and explicit cursor attributes let you
  15052.  14,WHERE CURRENT OF,
  15053.  access useful information about the execution of an UPDATE or a
  15054.  15,WHERE CURRENT OF,
  15055.  DELETE statement.
  15056.  16,WHERE CURRENT OF,
  15057.  
  15058.  17,WHERE CURRENT OF,
  15059.  
  15060.  18,WHERE CURRENT OF,
  15061.  See also: example where current of, update, delete, for update of,
  15062.  19,WHERE CURRENT OF,
  15063.            cursors, SQL% cursor, cursor attributes, commands, menu.
  15064.   1,WHILE,
  15065.  
  15066.   2,WHILE,
  15067.  
  15068.   3,WHILE,
  15069.                               WHILE
  15070.   4,WHILE,
  15071.                                                    PL/SQL statement
  15072.   5,WHILE,
  15073.  
  15074.   6,WHILE,
  15075.  WHILE condition LOOP
  15076.   7,WHILE,
  15077.      sequence_of_statements
  15078.   8,WHILE,
  15079.  END LOOP;
  15080.   9,WHILE,
  15081.  
  15082.  10,WHILE,
  15083.  
  15084.  11,WHILE,
  15085.  In a WHILE loop, as long as the condition evaluates to TRUE at the
  15086.  12,WHILE,
  15087.  start of each iteration, the sequence_of_statements is executed.
  15088.  13,WHILE,
  15089.  The loop terminates once the condition evaluates to FALSE or NULL.
  15090.  14,WHILE,
  15091.  
  15092.  15,WHILE,
  15093.  
  15094.  16,WHILE,
  15095.  For other loops see: loop, cursor for, numeric for.
  15096.  17,WHILE,
  15097.  
  15098.  18,WHILE,
  15099.  
  15100.  19,WHILE,
  15101.  See also: example while, conditions, boolean comparisons, commands.
  15102.