Oracle SQL Plus: CIS 331: Introduction To Database Systems
Oracle SQL Plus: CIS 331: Introduction To Database Systems
Topics:
Common SQL*Plus commands TAB table (not quite a table, but we will think of it as a table for the time being)
Password and @
PASSWORD Changes the password for the current user. Alternatively, on older Oracle servers, PASSWORD is not recognized as a command, so you have to work around with
ALTER USER username IDENTIFIED BY password
@ You can use @ to call a SQL script. If you downloaded the demo.sql SQL script into your SQL directory, you can execute it by typing @Z:\SQL\demo.sql (or just @Z:\SQL\demo, if you do not specify the file extension, SQL*Plus will assume it is .sql)
Describe, Host
DESC Shorthand and a synonym for DESCRIBE. Shows the columns in a table with the appropriate datatypes, and constraints, if appropriate (if a particular field nullable, for example). HOST Opens a shell window.
Edit, /
EDIT Edits the last typed SQL command. Useful if you made a typo and do not want to practice your typing skills over and over again. Notice that edit brings back the last SQL command, not the SQL*Plus command. (What is the difference between a SQL and a SQL*Plus command?) / Executes the last SQL command once again.
Prompt, Tab
PROMPT At this moment think of PROMPT as a command which echoes to the screen whatever you type after it. So PROMPT yourname outputs yourname to the screen. TAB To check which tables you have in the database under your account, you can check the tab table (strictly speaking, tab is not a table, but more about this in time to come), by typing SELECT * FROM TAB;
Vladimir Vacic, Temple University
7