Writing Basic SQL Statements. Select functions презентация

Содержание


Презентации» Информатика» Writing Basic SQL Statements. Select functions
Writing Basic  SQL StatementsObjectives
 After completing this lesson, you should be able to doCapabilities of SQL SELECT StatementsBasic SELECT Statement
 SELECT identifies what columns
 FROM identifies which tableWriting SQL Statements
 SQL statements are not case sensitive. 
 SQLSelecting All ColumnsSelecting Specific ColumnsColumn Heading Defaults
 Default justification
 Left: Date and character data
 Right:Arithmetic Expressions
 Create expressions on NUMBER and DATE data by usingUsing Arithmetic OperatorsOperator Precedence
 Multiplication and division take priority over addition and subtraction.
Operator PrecedenceUsing ParenthesesDefining a Null Value
 A null is a value that isNull Values in Arithmetic Expressions
 Arithmetic expressions containing a null valueDefining a Column Alias
 Renames a column heading
 Is useful withUsing Column AliasesConcatenation Operator
 Concatenates columns or character strings to other columns 
Using the Concatenation OperatorLiteral Character Strings
 A literal is a character, expression, or numberUsing Literal Character StringsDuplicate Rows
 The default display of queries is all rows, includingEliminating Duplicate RowsSQL and SQL*Plus InteractionSQL Statements Versus SQL*Plus CommandsOverview of SQL*Plus
 Log in to SQL*Plus.
 Describe the table structure.
Logging In to SQL*Plus
 From Windows environment:
   
 Displaying Table Structure
 Use the SQL*Plus DESCRIBE command to display theDisplaying Table StructureSQL*Plus Editing Commands
 A[PPEND] text			
 C[HANGE] / old / new	
 C[HANGE]SQL*Plus Editing Commands
 I[NPUT]
 I[NPUT] text
 L[IST]
 L[IST] n
 L[IST] mSQL*Plus File Commands
 SAVE filename
 GET filename
 START filename
 @ filename
Summary
 Use SQL*Plus as an environment to:
 Execute SQL statements
 EditPractice Overview
 Selecting all data from different tables
 Describing the structure



Слайды и текст этой презентации
Слайд 1
Описание слайда:
Writing Basic SQL Statements


Слайд 2
Описание слайда:
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 Differentiate between SQL statements and SQL*Plus commands

Слайд 3
Описание слайда:
Capabilities of SQL SELECT Statements

Слайд 4
Описание слайда:
Basic SELECT Statement SELECT identifies what columns FROM identifies which table

Слайд 5
Описание слайда:
Writing SQL Statements 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. Tabs and indents are used to enhance readability.

Слайд 6
Описание слайда:
Selecting All Columns

Слайд 7
Описание слайда:
Selecting Specific Columns

Слайд 8
Описание слайда:
Column Heading Defaults Default justification Left: Date and character data Right: Numeric data Default display: Uppercase

Слайд 9
Описание слайда:
Arithmetic Expressions Create expressions on NUMBER and DATE data by using arithmetic operators.

Слайд 10
Описание слайда:
Using Arithmetic Operators

Слайд 11
Описание слайда:
Operator Precedence Multiplication and division take priority over addition and subtraction. Operators of the same priority are evaluated from left to right. Parentheses are used to force prioritized evaluation and to clarify statements.

Слайд 12
Описание слайда:
Operator Precedence

Слайд 13
Описание слайда:
Using Parentheses

Слайд 14
Описание слайда:
Defining a Null Value A null is a value that is unavailable, unassigned, unknown, or inapplicable. A null is not the same as zero or a blank space.

Слайд 15
Описание слайда:
Null Values in Arithmetic Expressions Arithmetic expressions containing a null value evaluate to null.

Слайд 16
Описание слайда:
Defining a Column Alias Renames a column heading Is useful with calculations Immediately follows column name; optional AS keyword between column name and alias Requires double quotation marks if it contains spaces or special characters or is case sensitive

Слайд 17
Описание слайда:
Using Column Aliases

Слайд 18
Описание слайда:
Concatenation Operator Concatenates columns or character strings to other columns Is represented by two vertical bars (||) Creates a resultant column that is a character expression

Слайд 19
Описание слайда:
Using the Concatenation Operator

Слайд 20
Описание слайда:
Literal Character Strings A literal is a character, expression, or number included in the SELECT list. Date and character literal values must be enclosed within single quotation marks. Each character string is output once for each row returned.

Слайд 21
Описание слайда:
Using Literal Character Strings

Слайд 22
Описание слайда:
Duplicate Rows The default display of queries is all rows, including duplicate rows.

Слайд 23
Описание слайда:
Eliminating Duplicate Rows

Слайд 24
Описание слайда:
SQL and SQL*Plus Interaction

Слайд 25
Описание слайда:
SQL Statements Versus SQL*Plus Commands

Слайд 26
Описание слайда:
Overview of SQL*Plus Log in to SQL*Plus. Describe the table structure. Edit your SQL statement. Execute SQL from SQL*Plus. Save SQL statements to files and append SQL statements to files. Execute saved files. Load commands from file to buffer to edit.

Слайд 27
Описание слайда:
Logging In to SQL*Plus From Windows environment: From command line: sqlplus [username[/password [@database]]]

Слайд 28
Описание слайда:
Displaying Table Structure Use the SQL*Plus DESCRIBE command to display the structure of a table.

Слайд 29
Описание слайда:
Displaying Table Structure

Слайд 30
Описание слайда:
SQL*Plus Editing Commands A[PPEND] text C[HANGE] / old / new C[HANGE] / text / CL[EAR] BUFF[ER] DEL DEL n DEL m n

Слайд 31
Описание слайда:
SQL*Plus Editing Commands I[NPUT] I[NPUT] text L[IST] L[IST] n L[IST] m n R[UN] n n text 0 text

Слайд 32
Описание слайда:
SQL*Plus File Commands SAVE filename GET filename START filename @ filename EDIT filename SPOOL filename

Слайд 33
Описание слайда:
Summary Use SQL*Plus as an environment to: Execute SQL statements Edit SQL statements

Слайд 34
Описание слайда:
Practice Overview Selecting all data from different tables Describing the structure of tables Performing arithmetic calculations and specifying column names Using SQL*Plus editor

Слайд 35
Описание слайда:

Слайд 36
Описание слайда:

Слайд 37
Описание слайда:

Слайд 38
Описание слайда:


Скачать презентацию на тему Writing Basic SQL Statements. Select functions можно ниже:

Похожие презентации