Content deleted Content added
Link suggestions feature: 2 links added. Tags: Visual edit Mobile edit Mobile web edit Newcomer task Suggested: add links |
|||
(34 intermediate revisions by 25 users not shown) | |||
Line 1:
{{Lead too short|date=November 2022}}
[[File:SqlPlus connected.png|thumb|command line]]
'''SQL Plus''' is the most basic [[Oracle Database]] utility, with a basic [[command-line interface]], commonly used by users, administrators, and programmers.
==Command types==
SQL
# SQL statements
# [[PL/SQL]] blocks
# SQL
#
#
# Comments
# External commands prefixed by the ! char
Line 14 ⟶ 17:
Scripts can include all of these components.
An Oracle programmer in the appropriately configured software environment can launch SQL
$ sqlplus scott/tiger
where the Oracle user <code>scott</code> has the password <code>tiger</code>. SQL
Interactive use can then start by entering a SQL statement (terminated by a semicolon), a PL/SQL block, or another command. For example:
<
SQL> select 'Hello world' as example from dual;
Line 30 ⟶ 33:
--------------------------------
Hello world
</syntaxhighlight>
== History ==
The first version of SQL
After Oracle programmers had added new features to UFI, its name became ''Advanced UFI''. The name "Advanced UFI" changed to "SQL
==Usage==
Graphical interfaces from Oracle or third parties have diminished the proportion of [[Oracle Database|Oracle database]] end-users who depend on the SQL
[[Oracle Corporation]]'s wrappers/gui-fications/replacements for SQL
* Oracle SQL
|
|
|
|last
|
|date
|publisher = Cardiff University
|archive-url = https://web.archive.org/web/20081201065932/http://docs.cs.cf.ac.uk/html/601/node4.html
|
|quote = Oracle's SQL Plus Worksheet is a straight-forward, easy-to-use, graphical user interface for SQL.
|
}}
</ref>
* iSQL
| url = http://www.orafaq.com/wiki/ISQLPlus
| title = ISQLPlus
|
| date = 2008-02-29
| publisher = Oracle FAQ
| quote = iSQLPlus (iSQL Plus) is a web-based utility similar to the SQL Plus command line utility for executing SQL and PL/SQL commands (available up to Oracle 10gR2).
}}
</ref>
Line 92 ⟶ 73:
| url = http://www.oracle.com/technology/products/database/sql_developer/files/featurelist_1_5.htm#nf_sql
| title = Oracle SQL Developer 1.5: Feature List
|
| publisher = Oracle Corporation
| archive-url = https://web.archive.org/web/20080724133233/http://www.oracle.com/technology/products/database/sql_developer/files/featurelist_1_5.htm#nf_sql
| archive-date = 2008-07-24
|
| quote = The SQL Plus commands supported by Oracle SQL Developer SQL Worksheet are listed [...]
}}
</ref> a component of [[Oracle SQL Developer]]
Line 115 ⟶ 84:
| url = http://www.oracle.com/technology/products/database/application_express/html/what_is_apex.html
| title = Oracle Application Express
|
| publisher = Oracle Corporation
| archive-url = https://web.archive.org/web/20061021062241/http://www.oracle.com/technology/products/database/application_express/html/what_is_apex.html
| archive-date = 2006-10-21
|
| quote = SQL Workshop provides tools to enable you to view and manage database objects from a Web browser. Use SQL Commands to run SQL and PL/SQL statements. ...
}}
Line 138 ⟶ 95:
=== Oracle 11g ===
Starting from Oracle database 11g, iSqlplus (web based) and sqlplus GUI no longer ship with Oracle database software.<ref>[http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/whatsnew.htm#BGGBABGJ Deprecated Components in Oracle Database 11g Release 1 (11.1)], retrieve by 25-Jun-2009</ref>
The command-line SQL
==Compatibility==
Other vendors have made their software somewhat compatible with SQL
== Integration ==
Line 148 ⟶ 105:
=== Variables ===
SQL
* user variables, displayable with the <code>DEFINE</code> command and referenceable with one or two cases of a prefixed character (default prefixes: '&' and '&&'). Oracle Corporation calls these variables "substitution variables". Programmers can use them anywhere in a SQL or PL/SQL statement or in SQL
** predefined variables, prefixed with an underscore ('_')<ref>
{{cite book
|last= Alapati
|first= Sam R.
|title= Expert Oracle Database 11g Administration
|url=
|access-date= 2009-07-29
|year= 2008
|publisher= Apress
|isbn= 978-1-4302-1015-3
|pages= 118–119
|chapter= 4
|
}}
</ref>
Line 194 ⟶ 127:
|first = Natalka
|last = Roshak
|title = Spice up your SQL Scripts with Variables
|url = http://www.orafaq.com/node/515
|work = Oracle FAQ
|date = 2005-11-06
|access-date = 2009-07-29
|quote = & and && indicate substitution variables in SQL Plus scripts or commands.
}}
</ref>
Line 212 ⟶ 139:
|first = René
|last = Nyffenegger
|
|url = http://www.adp-gmbh.ch/ora/sqlplus/use_vars.html
|work = René Nyffenegger's collection of things on the web
|
|quote = In SQL Plus, a bind variable is declared with <code>variable</code> [...] The value of the bind variable can then be printed with <code>print</code>
}}
</ref>
Line 235 ⟶ 151:
{{cite web
| url = https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12052.htm
| title = SQL
| last1 = Watt
| first1 = Simon
Line 243 ⟶ 159:
| page = 74
| access-date = 2015-11-04
| quote = WHENEVER SQLERROR [...] [d]irects SQL
}}
</ref>
Line 249 ⟶ 165:
{{cite web
| url = https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12051.htm
| title = SQL
| last1 = Watt
| first1 = Simon
Line 257 ⟶ 173:
| page = 73
| access-date = 2015-11-04
| quote = WHENEVER OSERROR [...] [d]irects SQL
}}
</ref>
while running a subsequent SQL
=== Installation and configuration ===
SQL*Plus needs to be installed and configured on the machine where you intend to use it. This usually involves setting up Oracle client software and configuring network connections to Oracle databases.<ref>{{Cite web |title=Oracle database services and products offer customers cost-optimized and high-performance versions of Oracle Database, the world's leading converged, multi-model database management system |url=https://www.oracle.com/database/}}</ref>
== Supplementary software ==
* [http://www.softtree.com SQL Assistant] SQL Assistant add-on for SQL
* [https://web.archive.org/web/20101128023958/http://utopia.knoware.nl/~hlub/uck/rlwrap/ rlwrap] rlwrap does [[GNU]] [[Readline]] like command completion for SQL
== See also ==
* [[Oracle SQL Developer]]
* [[Oracle SQL/PLSQL Developer]]
* [[techaid71/most-common-sqlplus-commands]]
==References==
Line 273 ⟶ 194:
==External links==
* [http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/toc.htm SQL
* [http://www.orafaq.com/wiki/SQL
* [http://www.sql-plus.com/ SQL
{{Authority control}}
{{DEFAULTSORT:Sql Plus}}
|