PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

Send a file File manager PDF Toolbox Search Help Contact



Les01 .pdf



Original filename: Les01.pdf
Title: PowerPoint Presentation
Author: Oracle

This PDF 1.5 document has been generated by Microsoft® PowerPoint® 2013, and has been sent on pdf-archive.com on 05/11/2015 at 22:55, from IP address 41.176.x.x. The current document download page has been viewed 429 times.
File size: 508 KB (37 pages).
Privacy: public file




Download original PDF file









Document preview


Retrieving Data Using
the SQL SELECT Statement

Copyright © 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do
the following:
• List the capabilities of SQL SELECT statements
• Execute a basic SELECT statement


1-2

Differentiate between SQL statements and
iSQL*Plus commands

Copyright © 2004, Oracle. All rights reserved.

Capabilities of SQL SELECT Statements

Projection

Selection

Table 1

Table 1

Join

Table 1
1-3

Table 2
Copyright © 2004, Oracle. All rights reserved.

Basic SELECT Statement

SELECT *|{[DISTINCT] column|expression [alias],...}
FROM
table;




1-4

SELECT identifies the columns to be displayed
FROM identifies the table containing those columns

Copyright © 2004, Oracle. All rights reserved.

Selecting All Columns

SELECT *
FROM
departments;

1-5

Copyright © 2004, Oracle. All rights reserved.

Selecting Specific Columns

SELECT department_id, location_id
FROM
departments;

1-6

Copyright © 2004, Oracle. All rights reserved.

Writing SQL Statements









1-7

SQL statements are not case-sensitive.
SQL statements can be on one or more lines.
Keywords cannot be abbreviated or split
across lines.
Clauses are usually placed on separate lines.
Indents are used to enhance readability.
In iSQL*Plus, SQL statements can optionally be
terminated by a semicolon (;). Semicolons are
required if you execute multiple SQL statements.
In SQL*plus, you are required to end each SQL
statement with a semicolon (;).

Copyright © 2004, Oracle. All rights reserved.

Column Heading Defaults


iSQL*Plus:
– Default heading alignment: Center
– Default heading display: Uppercase



SQL*Plus:
– Character and Date column headings are leftaligned
– Number column headings are right-aligned
– Default heading display: Uppercase

1-8

Copyright © 2004, Oracle. All rights reserved.

Arithmetic Expressions

Create expressions with number and date data by
using arithmetic operators.
Operator
+

Add

-

Subtract

*

Multiply

/

1-9

Description

Divide

Copyright © 2004, Oracle. All rights reserved.


Related documents


PDF Document intro
PDF Document les01
PDF Document les02
PDF Document acc 561 week 1 financial statement review
PDF Document acc 561 week 1 financial statement review
PDF Document acc 561 week 1 financial statement review


Related keywords