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>*Plus110 John Chen6 rows selected.Note that a terminating semi-colon (;) is optional with <strong>SQL</strong> *Plus commands, butrequired with <strong>SQL</strong> statements.10.2.4 <strong>SQL</strong>*Plus DESCRIBE Command<strong>SQL</strong>*Plus provides the DESCRIBE to display a description of a database object. Forexample, the following displays the structure of the employees table. Thisdescription is useful when constructing <strong>SQL</strong> statements that manipulate theemployees table.<strong>SQL</strong>> DESCRIBE employeesNameNull? Type---------------------------------------- -------- ------------EMPLOYEE_ID NOT NULL NUMBER(6)FIRST_NAME VARCHAR2(20)LAST_NAME NOT NULL VARCHAR2(25)EMAIL NOT NULL VARCHAR2(25)PHONE_NUMBER VARCHAR2(20)HIRE_DATE NOT NULL DATEJOB_ID NOT NULL VARCHAR2(10)SALARY NUMBER(8,2)COMMISSION_PCT NUMBER(2,2)MANAGER_ID NUMBER(6)DEPARTMENT_ID NUMBER(4)10.2.5 <strong>SQL</strong>*Plus SET CommandsThe <strong>SQL</strong>*Plus SET commands can be used to specify various <strong>SQL</strong>*Plus settings, suchas the format of the output from <strong>SQL</strong>*Plus statements. For example, the following SETcommands specify the number of lines per page display and the number of charactersper line in the output:<strong>SQL</strong>> SET PAGESIZE 200<strong>SQL</strong>> SET LINESIZE 140To enable output from PL/<strong>SQL</strong> blocks with DBMS_OUTPUTTo view all the settings, enter the following at the <strong>SQL</strong> prompt:<strong>SQL</strong>> SHOW ALLFor information about the <strong>SQL</strong>*Plus SERVEROUTPUT setting to display output from aPL/<strong>SQL</strong> program, see Inputting and Outputting Data with PL/<strong>SQL</strong>.See Also:10.2.6 Running Scripts From <strong>SQL</strong>*Plus■<strong>SQL</strong>*Plus User's Guide and Reference for information setting up the<strong>SQL</strong>*Plus environment with a login fileYou can use a text editor to create <strong>SQL</strong>*Plus script files containing <strong>SQL</strong>*Plus, <strong>SQL</strong>, andPL/<strong>SQL</strong> statements. For consistency, use the .sql extension for the script file name.<strong>SQL</strong>*Plus: Usage Information 10-3

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

Saved successfully!

Ooh no, something went wrong!