SQL+ ANSWER QUESTONS
- SQL*Plus commands
- SQL commands
- PL/SQL blocks
DEFINE | 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*Plus |
GET | Retrieves a SQL file and places it into the SQL buffer |
HOST | Issue a 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 and Run the command stored in the SQL buffer (short: /) |
SAVE | Saves command in the SQL buffer to a file.Eg "save x" will create a script file called x.sql |
SET | Modify the SQL*Plus environment eg.SET PAGESIZE 23 |
SHOW | Show environment settings (short: SHO).Eg SHOW ALL, SHO PAGESIZE etc. |
SPOOL | Send output to a file.Eg "spool x" will save STDOUT to a file called x.lst |
START | Run a SQL script file (short: @) |
AFIEDT.BUF is the SQL*Plus default edit save file.When you issue the command "ed" or "edit" without arguments, the last SQL or PL/SQL command will be saved to a file called AFIEDT.BUF and opened in the default editor.
A single @ symbol runs the script relative to the current directory, the double at (@@) runs a command file relative to the directory of the current script
"&&" is used to create a permanent substitution variable as with the DEFINE command and the OLD_VALUE or NEW_VALUE clauses of a COLUMN statement.
The difference is that "HOST" will perform variable substitution (& and && symbols), whereas "!" will not.
Eg:
SQL> WENEVER OSERROR EXIT 9
SQL> WHENEVER SQLERROR EXIT SQL.SQLCODE
This table is created by the V7PUP.SQL and PUPBLD.SQL scripts.
Note that this table is not used when someone signs on as user SYSTEM.
Eg.to disable all users whose names starts with OPS$ from executing the CONNECT command:
SQL> INSERT INTO SYSTEM.PRODUCT_USER_PROFILE VALUES ('SQL*Plus', 'OPS$%', 'CONNECT', NULL, NULL, 'DISABLED', NULL, NULL);
SET NEWPAGE 0
SET SPACE 0
SET PAGESIZE 0
SET FEEDBACK OFF
SET HEADING OFF
0 comments:
Feel free to contact the admin for any suggestions and help.