Introduction
At the SQL prompt, you can begin typing any SQL command. Upon hitting return (i.e., enter key) the SQL prompt will change to line number prompts. When you are finished typing a command, type / or RUN to execute the SQL command. Also, a semicolon at the end of the SQL command will execute the command immediately after hitting return. In addition to SQL commands, /, and RUN, other commands can be issued at the SQL prompt (a semicolon does not have to follow the nonSQL commands).
Commands
DESCRIBE tablename -- lists the attributes and their specifications of tablename
EDIT -- Places you in an editor. The buffer contents are put into the editor
GET filename -- Retrieves a file and places it into the buffer
SAVE filename -- Saves the buffer to the name file
START filename -- Executes the commands in the file
CLEAR BUFFER -- Clears the buffer
Line Editing
One way to change an SQL statement in the buffer is by using the line editor. The following are a list of line edit commands.
LIST or L -- Lists the contents of the buffer
LIST n or L n -- Lists the contents of line number n in the buffer and makes the line current
LIST * or L * -- Lists the current line
LIST m n -- Lists the range from m to n line
Append text or A text -- Adds to the end of the current line (e.g., "A ," adds a comma to the end of line
INPUT or I -- Adds one or more lines after the current line so you can begin adding the text.
CHANGE /text -- Deletes text from the current line
CHANGE /oldtext/newtext--Replaces oldtext with newtext in the current line
DEL -- Deletes the current line
alter user syntax
changing password:
alter user <user_name> identified by <new_password>;
locking user:
alter user <user_name> account lock;
unlocking user:
alter user <user_name> account unlock;
change password and unlock user:
alter user <user_name> identified by <new_password> account unlock;
Oracle Exports
$ exp <user>/<pass> file=<name>.dmp log=<name>.log
i don't find the "exp"
i don't find the "exp" command for linux... where I can find it?
Thank you!