80 likes | 358 Views
What is it?. SQLPLUS is an Oracle user interface with application languageProvides an interactive environment that allows users to:Connect to and disconnect from a database;Analyze SQL statements;Control the output format;Execute a bunch of SQL statements from a file.. How to Get HELP. SQLPLUS
E N D
1. SQL*PLUS
2. What is it? SQLPLUS is an Oracle user interface with application language
Provides an interactive environment that allows users to:
Connect to and disconnect from a database;
Analyze SQL statements;
Control the output format;
Execute a bunch of SQL statements from a file.
3. How to Get HELP SQLPLUS commands are described in SQLPLUS Help system
SQL> HELP index
This command returns list of all SQLPLUS commands
SQL> HELP Command
4. Useful SQLPLUS Commands Current SQL statement is stored in a buffer To display the buffer content use LIST command
To modify buffer content use CHANGE command
CHANGE /old_string/new_string/
To re-execute the statement from the buffer
SQL> /
5. Other Useful SQLPLUS Commands SAVE – saves buffer content into a file on the host
SAVE File_name.sql;
DESCRIBE (DESC) – displays table’s definition (its fields and data types)
DESC Table_name;
6. Record Your Session SPOOL file_name
The command records SQL statements, SQLPLUS commands and system’s responses to the specified file
SPOOL OFF – stops spooling
SPOOL OUT – stops spooling and sends the file to the printer
7. Other Useful SQLPLUS Commands (cont…) GET – loads the file content from the host into statement buffer
GET File_name.sql;
The statement can be re-executed by “/” command
To execute a statement from a file without GET command
@File_name.sql;
8. Using HOST Command HOST is used to temporary exit to host operating system
SQL> HOST
To return to SQLPLUS session use EXIT command