1-SQL(ppt 608) 英文版.rar

tuj爱
V 实名认证
内容提供者
热门搜索
SQL 英文版
欧亿·体育(中国)有限公司大小:1647KB(压缩后)
文档格式:PPT
欧亿·体育(中国)有限公司语言:中文版/英文版/日文版
解压密码:m448
更新时间:2015/1/24(发布于重庆)

类型:积分欧亿·体育(中国)有限公司
积分:15分 (VIP无积分限制)
推荐:升级会员

   点此下载 ==>> 点击下载文档


文本描述
Writing Basic SQL Statements 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 Capabilities of SQL SELECT Statements Basic SELECT Statement SELECT identifies what columns FROM identifies which table 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. Selecting All Columns Selecting Specific Columns Column Heading Defaults Default justification Left: Date and character data Right: Numeric data Default display: Uppercase Arithmetic Expressions Create expressions on NUMBER and DATE data by using arithmetic operators. Using Arithmetic Operators 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. Operator Precedence Using Parentheses 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. Null Values in Arithmetic Expressions Arithmetic expressions containing a null value evaluate to null. 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 Using Column Aliases 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 Using the Concatenation Operator 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. Using Literal Character Strings Duplicate Rows The default display of queries is all rows, including duplicate rows. Eliminating Duplicate Rows SQL and SQL*Plus Interaction SQL Statements Versus SQL*Plus Commands 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. Logging In to SQL*Plus From Windows environment:     From command line: sqlplus [username[/password                     [@database]]]          

版权所有: 欧亿·体育(中国)有限公司©2025 客服电话: 0411-88895936 18842816135

欧亿·体育(中国)有限公司