SQL Plus

Author: r | 2025-04-25

★★★★☆ (4.3 / 2959 reviews)

snipping tool windows 11 download

Related Terms for Free Download Oracle Oracle Sql Plus Free Download Oracle Sql Plus Oracle 8.0, Free Download Oracle Sql Plus Oracle 9i, Sql Plus Oracle Pl Sql, Free Download Oracle Sql Plus Oracle 90, Free Download Oracle Sql Plus Oracle 6, Oracle Sql Plus 10g Oracle, Oracle Sql Plus 9 Oracle, Sql Plus Oracle Pl Sql En Espa Ol, Oracle Sql

smart start client portal

[Database] (SQL Plus, SQL Dev

Transact SQL into equivalent PL/ SQL code. It automates more than 90% of the Sybase Transact SQL code conversion into Oracle PL/SQ...SwisSQL - SQL Server to Oracle Migration Tool 2.6screenshot | size: 14.51 MB | price: $395 | date: 1/20/2005...SwisSQL- SQL Server to Oracle Edition is an Automated Migration tool to convert Microsoft SQL Server Transact SQL stored procedures to Oracle PL/S...SwisSQL - Sybase to SQL Server Migration Tool 3.0screenshot | size: 14.48 MB | price: $395 | date: 3/31/2005...SwisSQL - Sybase to Oracle Edition is an automated migration tool to convert stored procedures implemented in Sybase ASE (Adaptive Server Enterprise) Transact SQL into equivalent PL/ SQL code. It automates more than 80% of the Sybase Transact SQL code conversion into Oracle PL/SQ...OraDump Export Kit 4.5screenshot | size: 3.72 MB | price: $149 | date: 8/19/2009extract data from oracle dump files...ls to export data from Oracle dump ...Oracle Sybase ASE Import, Export & Convert Software 7.0screenshot | size: 411 KB | price: $29.99 | date: 7/2/2007...fer tables to and from Oracle and Sybase ASE (Adaptive Server Enterprise) databases. Importing and exporting can be done without SQL kn...Related Terms for Oracle Sql PlusFree Download Oracle Sql Plus Oracle 8.0, Oracle Sql Plus 8.0, Free Download Oracle Sql Plus Oracle 9i, Oracle Sql Plus Free Version, Oracle Sql Plus Editor, Oracle Sql Plus 9, Oracle Sql Plus 10g, Oracle Sql Plus 8.0.1, Free Download Oracle Sql Plus Oracle 90, Oracle Sql Plus 8.0 Standard Edition. Procedures are PL/SQL functions, packages, or procedures. To create stored procedures, you use the following SQL CREATE commands: CREATE FUNCTION CREATE LIBRARY CREATE PACKAGE CREATE PACKAGE BODY CREATE PROCEDURE CREATE TRIGGER CREATE TYPE Entering any of these commands places you in PL/SQL mode, where you can enter your PL/SQL subprogram. For more information, see About Running PL/SQL Blocks. When you are done typing your PL/SQL subprogram, enter a period (.) on a line by itself to terminate PL/SQL mode. To run the SQL command and create the stored procedure, you must enter RUN or slash (/). A semicolon (;) will not execute these CREATE commands. When you use CREATE to create a stored procedure, a message appears if there are compilation errors. To view these errors, you use SHOW ERRORS. For example: SHOW ERRORS PROCEDURE ASSIGNVLSee SHOW for more information. To execute a PL/SQL statement that references a stored procedure, you can use the SQL*Plus EXECUTE command. EXECUTE runs the PL/SQL statement that you enter immediately after the command. For example:EXECUTE EMPLOYEE_MANAGEMENT.NEW_EMP('BLAKE')See EXECUTE for more information. 4.6 Running SQL*Plus Commands You can use SQL*Plus commands to manipulate SQL commands and PL/SQL blocks and to format and print query results. SQL*Plus treats SQL*Plus commands differently than SQL commands or PL/SQL blocks. To speed up command entry, you can abbreviate many SQL*Plus commands. For information on and abbreviations of all SQL*Plus commands, see SQL*Plus Command Reference. Enter this SQL*Plus command:COLUMN SALARY FORMAT $99,999 HEADING 'MONTHLY SALARY'If you make a mistake, use Backspace to erase it and re-enter. When you have entered the line, press Return. SQL*Plus notes the new format and displays the SQL*Plus command prompt again, ready for a new command. Enter the following query and press Return to run it:SELECT EMPLOYEE_ID, LAST_NAME, JOB_ID, SALARYFROM EMP_DETAILS_VIEW WHERE SALARY > 12000;EMPLOYEE_ID LAST_NAME JOB_ID MONTHLY SALARY----------- ------------------------- ---------- -------------- 100 King AD_PRES $24,000 101 Kochhar AD_VP $17,000 102 De Haan AD_VP $17,000 145 Russell SA_MAN $14,000 146 Partners SA_MAN $13,500 201 Hartstein MK_MAN $13,0006 rows selected. Example 4-4 Entering a SQL*Plus Command This example shows how you might enter a SQL*Plus command to change the format used to display the column SALARY of the sample view, EMP_DETAILS_VIEW. The COLUMN command formatted the column SALARY with a dollar sign ($) and a comma (,) and gave it a new heading. 4.6.1 About Understanding SQL*Plus Command Syntax SQL*Plus commands have a different syntax from SQL

Difference between sql plus and sql loader

SQL*Plus FAQ:What is SQL*Plus and where does it come from?[edit]SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server software. It can be used interactively or driven from scripts. SQL*Plus is frequently used by DBAs and Developers to interact with the Oracle database.If you are familiar with other databases, sqlplus is equivalent to:"sql" in Ingres,"isql" in Sybase and SQL Server,"sqlcmd" in Microsoft SQL Server,"db2" in IBM DB2,"psql" in PostgreSQL, and"mysql" in MySQL.SQL*Plus's predecessor was called UFI (User Friendly Interface). UFI was included in the first Oracle releases up to Oracle 4. The UFI interface was extremely primitive and, in today's terms, anything but user friendly. If a statement was entered incorrectly, UFI issued an error and rolled back the entire transaction.How does one use the SQL*Plus utility?[edit]Start using SQL*Plus by executing the "sqlplus" command-line utility from the $ORACLE_HOME/bin directory. Some of the command line options:userid/password@db -- Connection details/nolog -- Do not login to Oracle. You will need to do it yourself.-s or -silent -- start sqlplus in silent mode. Not recommended for beginners!@myscript -- Start executing script called "myscript.sql"Look at this example session:sqlplus /nologSQL> connect scott/tigerSQL> select * from tab;SQL> disconnectSQL> exitPlease note that one must prepare the environment before starting sqlplus. Linux/ Unix example: $ . oraenvORACLE_SID = [orcl] ? orcl$ sqlplus scott/tigerWindows Example:Click on "Start" -> "Run" and enter "cmd"C:> set ORACLE_SID=orclC:> sqlplus scott/tigeror...C:> sqlplus scott/tiger@orclWhat commands can be executed from SQL*Plus?[edit]One can enter three kinds of commands from the SQL*Plus command prompt:SQL*Plus commandsSQL*Plus commands are used to set options for SQL*Plus, format reports, edit files, edit the command buffer, and so on. SQL*Plus commands do not interact with the database. These commands do not have to be terminated with a semicolon (;) (as is the case with SQL commands). Examples:SQL> CLEAR SCREENSQL> SHOW USERSQL> SET PAGESIZE 100SQL> START myscrip.sqlSQL commandsFor more information see the Oracle SQL FAQ. Eg:SQL> SELECT * FROM user_tables;PL/SQL blocksFor more information see the Oracle PL/SQL FAQ. Eg:BEGIN dbms_output.put_line('Hello World!');END;/What are the basic SQL*Plus commands?[edit]Here is a list of some of the most frequently used SQL*Plus commands:ACCEPT - Get input from the userDEFINE - Declare a variable (short: DEF)DESCRIBE - Lists the attributes of tables and other objects (short: DESC)EDIT - Places you in an editor so you can edit a SQL command (short: ED)EXIT or QUIT - Disconnect from the database and terminate SQL*PlusGET - Retrieves a SQL file and places it into the SQL bufferHOST - Issue an operating system command (short: !)LIST - Displays the last command executed/ command in the SQL buffer (short: L)PROMPT - Display a text string on the screen. Eg prompt Hello World!!!RUN - List. Related Terms for Free Download Oracle Oracle Sql Plus Free Download Oracle Sql Plus Oracle 8.0, Free Download Oracle Sql Plus Oracle 9i, Sql Plus Oracle Pl Sql, Free Download Oracle Sql Plus Oracle 90, Free Download Oracle Sql Plus Oracle 6, Oracle Sql Plus 10g Oracle, Oracle Sql Plus 9 Oracle, Sql Plus Oracle Pl Sql En Espa Ol, Oracle Sql I'm wondering what the difference is if any between SQL Express and SQL Plus. I know SQL Plus is used with Oracle but not sure if SQL Plus is a modification of SQL Express

Basic difference between SQL, MY sql, SQL plus, Oracle, Sql

Commands or PL/SQL blocks. You do not need to end a SQL*Plus command with a semicolon. When you finish entering the command, you can just press Return or click Execute. There is no need to end a SQL*Plus command with a semicolon. 4.6.1.1 About Continuing a Long SQL*Plus Command on Additional Lines You can continue a long SQL*Plus command by typing a hyphen at the end of the line and pressing Return. If you wish, you can type a space before typing the hyphen. SQL*Plus displays a right angle-bracket (>) as a prompt for each additional line. For example:COLUMN SALARY FORMAT $99,999 -HEADING 'MONTHLY SALARY'Since SQL*Plus identifies the hyphen as a continuation character, entering a hyphen within a SQL statement is ignored by SQL*Plus. SQL*Plus does not identify the statement as a SQL statement until after the input processing has joined the lines together and removed the hyphen. For example, entering the following:SELECT 200 -100 FROM DUAL;returns the error:SELECT 200 100 FROM DUAL *ERROR at line 1:ORA-00923: FROM keyword not found where expectedTo ensure that the statement is interpreted correctly, reposition the hyphen from the end of the first line to the beginning of the second line. 4.7 System Variables that Affect How Commands Run The SQL*Plus SET command controls many variables—called SET variables or system variables—which affect the way SQL*Plus runs your commands. System variables control a variety of conditions within SQL*Plus, including default column widths for your output, whether SQL*Plus displays the number of records selected by a command, and your page size. The examples in this guide are based on running SQL*Plus with the system variables at their default settings. Depending on the settings of your system variables, your output may appear slightly different than the output shown in the examples. (Your settings might differ from the default settings if you have a SQL*Plus LOGIN file on your computer.) See the SET command for more information on system variables and their default settings. See SQL*Plus Configuration and SQLPLUS Program Syntax for details on the SQL*Plus LOGIN file. To list the current setting of a system variable, enter SHOW followed by the variable name. See the SHOW command for information on other items you can list with SHOW. 4.8 About Stopping a Command while it is Running Suppose you have displayed the first page of a 50 page report and decide you do not need to see the Rest of it. Press Cancel, the system's interrupt character, which is usually CTRL+C. SQL*Plus stops the display. Note: Pressing Cancel does not stop the printing of a file that you have sent to a printer with the OUT clause of the SQL*Plus SPOOL command. (You will learn about printing query results in Formatting SQL*Plus Reports.) You can stop the printing of a file through your operating system. For more information, see your operating system's installation and user's guide. 4.9 About Running Operating System Commands You can execute an operating system command from the SQL*Plus command prompt. This is useful when you want to perform a task such as listing existing operating system files. To run an operating system command, enter the SQL*Plus command HOST followed by the operating system command. For example, this SQL*Plus command runs the command, DIRECTORY *.SQL: HOST DIRECTORY *.SQLWhen the command finishes running, the SQL*Plus command prompt appears again. Note: Operating system commands entered from a SQL*Plus session using the HOST command do not affect the current SQL*Plus session. For example, setting an operating system environment variable does not affect the current SQL*Plus session, but may affect SQL*Plus sessions started subsequently. You can suppress access to the HOST command. For more information about suppressing the HOST command see SQL*Plus Security. 4.10 About Pausing the Display You can use the PAUSE system variable to stop and examine the contents of the screen after each page during the display of a long report, or during the display of a table definition with many columns. You can use SET PAUSE to pause output after displaying each screen of a query or report. See SET PAU[SE] {ON | OFF | text} for more information. 4.11 About Saving Changes to the Database Automatically You can specify changes you wish to make to the information stored in the database using the SQL Database Manipulation Language (DML) commands UPDATE, INSERT, and DELETE—which can be used independently or within a PL/SQL block. These changes are not made permanent until you enter a SQL COMMIT command or a SQL Database Control Language (DCL) or Database Definition Language (DDL) command (such as CREATE TABLE), or use the autocommit feature. The SQL*Plus autocommit feature causes pending changes to be committed after a specified number of successful SQL DML transactions. (A SQL DML transaction is either an UPDATE, INSERT, or DELETE command, or a PL/SQL block.) You control

Dbms Sql Plus Software - Free Download Dbms Sql Plus - WinSite

Script tells SQL*Plus that you have finished entering the command, but do not want to run it yet. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number. Note: You can change the way blank lines appear and behave in SQL statements using the SET SQLBLANKLINES command. For more information about changing blank line behavior, see the SET command. To execute commands this way, press Return again; SQL*Plus now prompts you with the SQL*Plus command prompt. SQL*Plus does not execute the command, but stores it in the SQL buffer. See The SQL Buffer for details. If you subsequently enter another SQL command, SQL*Plus overwrites the previous command in the buffer. 4.5 About Running PL/SQL Blocks You can also use PL/SQL subprograms (called blocks) to manipulate data in the database. See your Oracle Database PL/SQL Language Reference for information on individual PL/SQL statements. SQL*Plus treats PL/SQL subprograms in the same manner as SQL commands, except that a semicolon (;) or a blank line does not terminate and execute a block. Terminate PL/SQL subprograms by entering a period (.) by itself on a new line. You can also terminate and execute a PL/SQL subprogram by entering a slash (/) by itself on a new line. You enter the mode for entering PL/SQL statements when: You type DECLARE or BEGIN. After you enter PL/SQL mode in this way, type the remainder of your PL/SQL subprogram. You type a SQL command (such as CREATE PROCEDURE) that creates a stored procedure. After you enter PL/SQL mode in this way, type the stored procedure you want to create. SQL*Plus stores the subprograms you enter in the SQL buffer. Execute the current subprogram with a RUN or slash (/) command. A semicolon (;) is treated as part of the PL/SQL subprogram and will not execute the command. SQL*Plus sends the complete PL/SQL subprogram to Oracle Database for processing (as it does SQL commands). See your Oracle Database PL/SQL Language Reference for more information. You might enter and execute a PL/SQL subprogram as follows:DECLARE x NUMBER := 100; BEGIN FOR i IN 1..10 LOOP IF MOD (i, 2) = 0 THEN --i is even INSERT INTO temp VALUES (i, x, 'i is even'); ELSE INSERT INTO temp VALUES (i, x, 'i is odd'); END IF; x := x + 100; END LOOP; END; ./4.5.1 About Creating Stored Procedures Stored

Sql Plus Light Software - Free Download Sql Plus Light - WinSite

4.1 About Entering and Executing Commands Unless stated otherwise, descriptions of commands are applicable to all user interfaces. In the command-line, type commands at the SQL*Plus prompt and press Return to execute them. Usually, you separate the words in a command with a space or a tab. You can use additional spaces or tabs between words to make your commands more readable. Case sensitivity is operating system specific. For the sake of clarity, all table names, column names, and commands in this guide appear in capital letters. You can enter three kinds of commands: SQL commands, for working with information in the database PL/SQL blocks, also for working with information in the database SQL*Plus commands, for formatting query results, setting options, and editing and storing SQL commands and PL/SQL blocks The manner in which you continue a command on additional lines, end a command, or execute a command differs depending on the type of command you wish to enter and run. Examples of how to run and execute these types of commands are found on the following pages. 4.1.1 The SQL Buffer The SQL buffer stores the most recently entered SQL command or PL/SQL block (but not SQL*Plus commands). The command or block remains in the buffer until replaced by the next SQL command or PL/SQL block. You can view the buffer contents with the LIST command. You can execute the command or block in the SQL buffer using the RUN or /(slash) commands. RUN displays the command or block in the buffer before executing it. /(slash) executes the command or block in the buffer without displaying it first. For information about editing a command or block stored in the buffer see About Editing Scripts in SQL*Plus Command-Line. SQL*Plus does not store the following in the SQL buffer: SQL*Plus commands Trailing white space Semicolon or slash characters you type to execute a command 4.1.2 About Executing Commands In command-line SQL*Plus, you type a command and direct SQL*Plus to execute it by pressing the Return key. SQL*Plus processes the command and re-displays the command prompt when ready for another command. 4.2 About Listing a Table Definition To see the definitions of each column in a given table or view, use the SQL*Plus DESCRIBE command. Name Null? Type ----------------------------------------- -------- ---------------- EMPLOYEE_ID NOT NULL NUMBER(6) JOB_ID NOT NULL VARCHAR2(10) MANAGER_ID NUMBER(6) DEPARTMENT_ID NUMBER(4) LOCATION_ID NUMBER(4) COUNTRY_ID CHAR(2) FIRST_NAME VARCHAR2(20) LAST_NAME NOT NULL. Related Terms for Free Download Oracle Oracle Sql Plus Free Download Oracle Sql Plus Oracle 8.0, Free Download Oracle Sql Plus Oracle 9i, Sql Plus Oracle Pl Sql, Free Download Oracle Sql Plus Oracle 90, Free Download Oracle Sql Plus Oracle 6, Oracle Sql Plus 10g Oracle, Oracle Sql Plus 9 Oracle, Sql Plus Oracle Pl Sql En Espa Ol, Oracle Sql

sql plus - adeqilajyd’s blog

Number of records retrieved depends on the setting of the system variable, FEEDBACK. See System Variables that Affect How Commands Run for more information. Example 4-3 Entering a SQL Command In this example, you will enter and execute a SQL command to display the employee number, name, job, and salary of each employee in the EMP_DETAILS_VIEW view. 4.4.1 About Understanding SQL Command Syntax Just as spoken language has syntax rules that govern the way we assemble words into sentences, SQL*Plus has syntax rules that govern how you assemble words into commands. You must follow these rules if you want SQL*Plus to accept and execute your commands. 4.4.1.1 About Dividing a SQL Command into Separate Lines You can divide your SQL command into separate lines at any points you wish, as long as individual words are not split. Thus, you can enter the query you entered in Example 4-3 on three lines: SELECT EMPLOYEE_ID, LAST_NAME, JOB_IDFROM EMP_DETAILS_VIEWWHERE SALARY>12000;In this guide, you will find most SQL commands divided into clauses, one clause on each line. In Example 4-3, for instance, the SELECT and FROM clauses were placed on separate lines. Many people find this clearly visible structure helpful, but you may choose whatever line division makes commands most readable to you. 4.4.1.2 About Ending a SQL Command You can end a SQL command in one of three ways: with a semicolon (;) with a slash (/) on a line by itself with a blank line A semicolon (;) tells SQL*Plus that you want to run the command. Type the semicolon at the end of the last line of the command, as shown in Example 4-3, and press Return or click Execute. SQL*Plus processes the command and also stores the command in the SQL buffer. See The SQL Buffer for details. If you mistakenly press Return before typing the semicolon, SQL*Plus prompts you with a line number for the next line of your command. Type the semicolon and press Return again or click Execute to run the command. A slash (/) on a line by itself also tells SQL*Plus that you wish to run the command. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number. Type a slash and press Return again or click Execute. SQL*Plus executes the command and stores it in the buffer. A blank line in a SQL statement or

Comments

User5968

Transact SQL into equivalent PL/ SQL code. It automates more than 90% of the Sybase Transact SQL code conversion into Oracle PL/SQ...SwisSQL - SQL Server to Oracle Migration Tool 2.6screenshot | size: 14.51 MB | price: $395 | date: 1/20/2005...SwisSQL- SQL Server to Oracle Edition is an Automated Migration tool to convert Microsoft SQL Server Transact SQL stored procedures to Oracle PL/S...SwisSQL - Sybase to SQL Server Migration Tool 3.0screenshot | size: 14.48 MB | price: $395 | date: 3/31/2005...SwisSQL - Sybase to Oracle Edition is an automated migration tool to convert stored procedures implemented in Sybase ASE (Adaptive Server Enterprise) Transact SQL into equivalent PL/ SQL code. It automates more than 80% of the Sybase Transact SQL code conversion into Oracle PL/SQ...OraDump Export Kit 4.5screenshot | size: 3.72 MB | price: $149 | date: 8/19/2009extract data from oracle dump files...ls to export data from Oracle dump ...Oracle Sybase ASE Import, Export & Convert Software 7.0screenshot | size: 411 KB | price: $29.99 | date: 7/2/2007...fer tables to and from Oracle and Sybase ASE (Adaptive Server Enterprise) databases. Importing and exporting can be done without SQL kn...Related Terms for Oracle Sql PlusFree Download Oracle Sql Plus Oracle 8.0, Oracle Sql Plus 8.0, Free Download Oracle Sql Plus Oracle 9i, Oracle Sql Plus Free Version, Oracle Sql Plus Editor, Oracle Sql Plus 9, Oracle Sql Plus 10g, Oracle Sql Plus 8.0.1, Free Download Oracle Sql Plus Oracle 90, Oracle Sql Plus 8.0 Standard Edition.

2025-04-04
User1537

Procedures are PL/SQL functions, packages, or procedures. To create stored procedures, you use the following SQL CREATE commands: CREATE FUNCTION CREATE LIBRARY CREATE PACKAGE CREATE PACKAGE BODY CREATE PROCEDURE CREATE TRIGGER CREATE TYPE Entering any of these commands places you in PL/SQL mode, where you can enter your PL/SQL subprogram. For more information, see About Running PL/SQL Blocks. When you are done typing your PL/SQL subprogram, enter a period (.) on a line by itself to terminate PL/SQL mode. To run the SQL command and create the stored procedure, you must enter RUN or slash (/). A semicolon (;) will not execute these CREATE commands. When you use CREATE to create a stored procedure, a message appears if there are compilation errors. To view these errors, you use SHOW ERRORS. For example: SHOW ERRORS PROCEDURE ASSIGNVLSee SHOW for more information. To execute a PL/SQL statement that references a stored procedure, you can use the SQL*Plus EXECUTE command. EXECUTE runs the PL/SQL statement that you enter immediately after the command. For example:EXECUTE EMPLOYEE_MANAGEMENT.NEW_EMP('BLAKE')See EXECUTE for more information. 4.6 Running SQL*Plus Commands You can use SQL*Plus commands to manipulate SQL commands and PL/SQL blocks and to format and print query results. SQL*Plus treats SQL*Plus commands differently than SQL commands or PL/SQL blocks. To speed up command entry, you can abbreviate many SQL*Plus commands. For information on and abbreviations of all SQL*Plus commands, see SQL*Plus Command Reference. Enter this SQL*Plus command:COLUMN SALARY FORMAT $99,999 HEADING 'MONTHLY SALARY'If you make a mistake, use Backspace to erase it and re-enter. When you have entered the line, press Return. SQL*Plus notes the new format and displays the SQL*Plus command prompt again, ready for a new command. Enter the following query and press Return to run it:SELECT EMPLOYEE_ID, LAST_NAME, JOB_ID, SALARYFROM EMP_DETAILS_VIEW WHERE SALARY > 12000;EMPLOYEE_ID LAST_NAME JOB_ID MONTHLY SALARY----------- ------------------------- ---------- -------------- 100 King AD_PRES $24,000 101 Kochhar AD_VP $17,000 102 De Haan AD_VP $17,000 145 Russell SA_MAN $14,000 146 Partners SA_MAN $13,500 201 Hartstein MK_MAN $13,0006 rows selected. Example 4-4 Entering a SQL*Plus Command This example shows how you might enter a SQL*Plus command to change the format used to display the column SALARY of the sample view, EMP_DETAILS_VIEW. The COLUMN command formatted the column SALARY with a dollar sign ($) and a comma (,) and gave it a new heading. 4.6.1 About Understanding SQL*Plus Command Syntax SQL*Plus commands have a different syntax from SQL

2025-04-15
User4289

SQL*Plus FAQ:What is SQL*Plus and where does it come from?[edit]SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server software. It can be used interactively or driven from scripts. SQL*Plus is frequently used by DBAs and Developers to interact with the Oracle database.If you are familiar with other databases, sqlplus is equivalent to:"sql" in Ingres,"isql" in Sybase and SQL Server,"sqlcmd" in Microsoft SQL Server,"db2" in IBM DB2,"psql" in PostgreSQL, and"mysql" in MySQL.SQL*Plus's predecessor was called UFI (User Friendly Interface). UFI was included in the first Oracle releases up to Oracle 4. The UFI interface was extremely primitive and, in today's terms, anything but user friendly. If a statement was entered incorrectly, UFI issued an error and rolled back the entire transaction.How does one use the SQL*Plus utility?[edit]Start using SQL*Plus by executing the "sqlplus" command-line utility from the $ORACLE_HOME/bin directory. Some of the command line options:userid/password@db -- Connection details/nolog -- Do not login to Oracle. You will need to do it yourself.-s or -silent -- start sqlplus in silent mode. Not recommended for beginners!@myscript -- Start executing script called "myscript.sql"Look at this example session:sqlplus /nologSQL> connect scott/tigerSQL> select * from tab;SQL> disconnectSQL> exitPlease note that one must prepare the environment before starting sqlplus. Linux/ Unix example: $ . oraenvORACLE_SID = [orcl] ? orcl$ sqlplus scott/tigerWindows Example:Click on "Start" -> "Run" and enter "cmd"C:> set ORACLE_SID=orclC:> sqlplus scott/tigeror...C:> sqlplus scott/tiger@orclWhat commands can be executed from SQL*Plus?[edit]One can enter three kinds of commands from the SQL*Plus command prompt:SQL*Plus commandsSQL*Plus commands are used to set options for SQL*Plus, format reports, edit files, edit the command buffer, and so on. SQL*Plus commands do not interact with the database. These commands do not have to be terminated with a semicolon (;) (as is the case with SQL commands). Examples:SQL> CLEAR SCREENSQL> SHOW USERSQL> SET PAGESIZE 100SQL> START myscrip.sqlSQL commandsFor more information see the Oracle SQL FAQ. Eg:SQL> SELECT * FROM user_tables;PL/SQL blocksFor more information see the Oracle PL/SQL FAQ. Eg:BEGIN dbms_output.put_line('Hello World!');END;/What are the basic SQL*Plus commands?[edit]Here is a list of some of the most frequently used SQL*Plus commands:ACCEPT - Get input from the userDEFINE - Declare a variable (short: DEF)DESCRIBE - Lists the attributes of tables and other objects (short: DESC)EDIT - Places you in an editor so you can edit a SQL command (short: ED)EXIT or QUIT - Disconnect from the database and terminate SQL*PlusGET - Retrieves a SQL file and places it into the SQL bufferHOST - Issue an operating system command (short: !)LIST - Displays the last command executed/ command in the SQL buffer (short: L)PROMPT - Display a text string on the screen. Eg prompt Hello World!!!RUN - List

2025-04-13
User8246

Commands or PL/SQL blocks. You do not need to end a SQL*Plus command with a semicolon. When you finish entering the command, you can just press Return or click Execute. There is no need to end a SQL*Plus command with a semicolon. 4.6.1.1 About Continuing a Long SQL*Plus Command on Additional Lines You can continue a long SQL*Plus command by typing a hyphen at the end of the line and pressing Return. If you wish, you can type a space before typing the hyphen. SQL*Plus displays a right angle-bracket (>) as a prompt for each additional line. For example:COLUMN SALARY FORMAT $99,999 -HEADING 'MONTHLY SALARY'Since SQL*Plus identifies the hyphen as a continuation character, entering a hyphen within a SQL statement is ignored by SQL*Plus. SQL*Plus does not identify the statement as a SQL statement until after the input processing has joined the lines together and removed the hyphen. For example, entering the following:SELECT 200 -100 FROM DUAL;returns the error:SELECT 200 100 FROM DUAL *ERROR at line 1:ORA-00923: FROM keyword not found where expectedTo ensure that the statement is interpreted correctly, reposition the hyphen from the end of the first line to the beginning of the second line. 4.7 System Variables that Affect How Commands Run The SQL*Plus SET command controls many variables—called SET variables or system variables—which affect the way SQL*Plus runs your commands. System variables control a variety of conditions within SQL*Plus, including default column widths for your output, whether SQL*Plus displays the number of records selected by a command, and your page size. The examples in this guide are based on running SQL*Plus with the system variables at their default settings. Depending on the settings of your system variables, your output may appear slightly different than the output shown in the examples. (Your settings might differ from the default settings if you have a SQL*Plus LOGIN file on your computer.) See the SET command for more information on system variables and their default settings. See SQL*Plus Configuration and SQLPLUS Program Syntax for details on the SQL*Plus LOGIN file. To list the current setting of a system variable, enter SHOW followed by the variable name. See the SHOW command for information on other items you can list with SHOW. 4.8 About Stopping a Command while it is Running Suppose you have displayed the first page of a 50 page report and decide you do not need to see the

2025-04-06

Add Comment