To select the tables you have in user tables
To describe a table
To re-execute a command
Note: the buffer can only hold one previous statement.
To find out what is in that buffer
or
To change part of your previous query in the buffer before running it
To save the query u have in the buffer to a file
To execute what is in this query file
Assuming you have made a lot of queries during a session and you want to save everthing at once
Any other command you type will be stored inside the <filename>.txt. But before this can happen, you need to do this:
So when you do the above, you can then exit sqlplus, and cat output.txt. The result will show you all the commands or work you have done while in sqlplus.
If you make new changes and you want to append it to <filename>.txt
To make changes to sql statement in an editor
To know what editor u are currently using to run ur sql statements
To change the sql statement editor to something else
To switch between sqlplus and your host prompt
To echo something
To insert a variable during your sql queries in sqlplus
To query all tables in the database
To paginate your output
To permanently set the pagination variable
The above command shows u where the SQLPATH variable is set to. So from here we can set our pagination variable in this path. In this dir is a file called login.sql. This file is used by each and every user on the database.
To find out more sqlplus commands
To change your password
To change the password of another user
Note: You can only do this if u care logged in as the sysdba.
To show your controlfiles
To suspend your database
This is useful when u want to perform backups without IO interference
To know the status of your database
To get out of suspend state
Note: After inserting a record into the oracle db using the insert Data Manipulation Language, you will need to commit ur changes using the commit command.
To know your default tablespace
Post new comment