12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.3.2 Updating Data With the UPDATE Statement ................................................................. 6-86.3.3 Deleting Data With the DELETE Statement .................................................................... 6-86.4 Transaction Control Statements................................................................................................ 6-86.4.1 Committing Transaction Changes..................................................................................... 6-96.4.2 Rolling Back a Transaction ................................................................................................. 6-96.5 Using Pseudocolumns, Sequences, and <strong>SQL</strong> Functions..................................................... 6-106.5.1 Using Pseudocolumns With <strong>SQL</strong> ................................................................................... 6-106.5.2 Using Sequences ............................................................................................................... 6-116.5.3 Using Character Functions .............................................................................................. 6-116.5.4 Using Arithmetic Operators............................................................................................ 6-126.5.5 Using Numeric Functions................................................................................................ 6-126.5.6 Using Date Functions ....................................................................................................... 6-136.5.7 Using Aggregate Functions............................................................................................. 6-146.6 Using <strong>SQL</strong> Data Definition Language Statements.............................................................. 6-156.6.1 Creating a Table With <strong>SQL</strong>.............................................................................................. 6-156.6.2 Creating and Modifying an Index With <strong>SQL</strong> ............................................................... 6-166.6.3 Creating and Modifying a Constraint With <strong>SQL</strong> ......................................................... 6-166.6.4 Altering a Table With <strong>SQL</strong> .............................................................................................. 6-176.6.5 Dropping a Table With <strong>SQL</strong>............................................................................................ 6-176.6.6 Creating and Dropping a Sequence ............................................................................... 6-176.6.7 Creating and Dropping a Synonym............................................................................... 6-187 PL/<strong>SQL</strong>: Usage Information7.1 Overview of PL/<strong>SQL</strong> ................................................................................................................. 7-17.2 Entering and Executing PL/<strong>SQL</strong> Code ................................................................................... 7-27.3 Utilizing the Main Features of PL/<strong>SQL</strong> .................................................................................. 7-27.3.1 Using PL/<strong>SQL</strong> Block Structure.......................................................................................... 7-37.3.2 Using Comments ................................................................................................................. 7-47.3.3 Declaring Variables and Constants................................................................................... 7-47.3.4 Using Identifiers in PL/<strong>SQL</strong> .............................................................................................. 7-57.3.5 Assigning Values to a Variable With the Assignment Operator .................................. 7-67.3.6 Using Literals ....................................................................................................................... 7-77.3.7 Declaring and Assigning Variables With DEFAULT or NOT NULL .......................... 7-87.3.8 Assigning Values to a Variable With SELECT INTO ..................................................... 7-97.3.9 Inputting and Outputting Data with PL/<strong>SQL</strong> ................................................................ 7-97.3.10 Using %ROWTYPE and %TYPE Attributes to Declare Data Types ......................... 7-107.3.10.1 Using the %ROWTYPE Attribute to Declare Variables....................................... 7-107.3.10.2 Using the %TYPE Attribute to Declare Variables................................................. 7-117.3.11 Using PL/<strong>SQL</strong> Control Structures ................................................................................. 7-117.3.11.1 Conditional Control With IF-THEN ....................................................................... 7-117.3.11.2 Conditional Control With the CASE Statement.................................................... 7-127.3.11.3 Iterative Control With LOOPs ................................................................................. 7-137.3.11.4 Sequential Control With GOTO .............................................................................. 7-157.3.12 Using Local PL/<strong>SQL</strong> Subprograms in PL/<strong>SQL</strong> Blocks .............................................. 7-157.3.13 Working With PL/<strong>SQL</strong> Data Structures ....................................................................... 7-177.3.13.1 Using Cursors............................................................................................................. 7-177.3.13.2 Using Collections....................................................................................................... 7-17vii

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

Saved successfully!

Ooh no, something went wrong!