12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using <strong>SQL</strong>*Plus■■■Running Scripts From <strong>SQL</strong>*PlusSpooling From <strong>SQL</strong>*PlusUsing Variables With <strong>SQL</strong>*Plus10.2.1 Starting and Exiting <strong>SQL</strong>*PlusTo start <strong>SQL</strong>*Plus from the operating system command prompt, enter the following:sqlplusWhen prompted, enter the username and password of the user account (schema) thatyou want to access. For example, enter HR for the username and your_hr_passwordwhen prompted.After you have started <strong>SQL</strong>*Plus, the <strong>SQL</strong>> prompt displays for you to type in <strong>SQL</strong>statements, as follows:<strong>SQL</strong>>When you want to quit or exit <strong>SQL</strong>*Plus, type EXIT or QUIT at the <strong>SQL</strong> prompt, asfollows:<strong>SQL</strong>> EXIT10.2.2 Displaying Help With <strong>SQL</strong>*PlusTo display a list of help topics for <strong>SQL</strong>*Plus commands enter HELP INDEX at the <strong>SQL</strong>prompt as follows:<strong>SQL</strong>> HELP INDEXFrom the list of <strong>SQL</strong>*Plus help topics, you can display help on an individual topic byentering HELP with a topic name. For example the following displays help on the<strong>SQL</strong>*Plus COLUMN command, which enables you to format column output:<strong>SQL</strong>> HELP COLUMN10.2.3 Entering and Executing <strong>SQL</strong> Statements and CommandsTo enter and execute <strong>SQL</strong> statements or commands, type in the statement or commandat the <strong>SQL</strong> prompt. At the end of a <strong>SQL</strong> statement, put a semi-colon (;) and then pressthe Enter key to execute the statement. For example:<strong>SQL</strong>> SELECT * FROM employees;If the statement does not fit on one line, type in the first line and press the Enter key.Continue entering lines, terminating the last line with a semi-colon (;). For example:<strong>SQL</strong>> SELECT employee_id, first_name, last_name2 FROM employees3 WHERE employee_id >= 105 AND employee_id

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!