Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transact-SQL 語言設計教學.

Similar presentations


Presentation on theme: "Transact-SQL 語言設計教學."— Presentation transcript:

1 Transact-SQL 語言設計教學

2 Introduction To Transact SQL
Module 1 Introduction To Transact SQL

3 ◆Types of Transact-SQL Statements
Data Definition Language CREATE object_name ALTER object_name DROP object_name Data Control Language GRANT DENY REVOKE Data Manipulation Language SELECT INSERT UPDATE DELETE

4 ◆Transact-SQL Syntax Elements
Types Of Data Variables System Functions Operators Control-of-Flow Language Elements Reserved Keywords Batch Directives

5 Numbers Table Dates SQL Variants Characters Cursor Binary User-defined
Types Of Data Numbers Dates Characters Binary Image and Text Table SQL Variants Cursor User-defined Uniqueidentifier

6 Variables 使用者自訂變數以DECLARE宣告 變數名稱以@開頭 以SET或SELECT指定變數值 變數有區域限制

7 System Functions Aggregate Functions Scalar Functions Rowset Functions
統計函數用以計算資料的數值,例如平均值,總計值等等 統計函數除了Count(*)之外,其他統計函數會自動忽略null值 Scalar Functions 對單一值運算然後傳回單一值。無論運算式是否為有效,純量函數皆可使用。 Rowset Functions 可用於 SQL 陳述式中的資料表參考

8 Operators 數字運算元 比較運算元 邏輯運算元 字串運算元 + - * / %
* / % 比較運算元 = > < >= <= <> 不要使用!= 邏輯運算元 AND OR NOT 字串運算元 +

9 Control-of-Flow Language Elements
Statement Level If …..Else Begin…..End While constructs Row Level CASE function

10 Reserved Keywords Batch Directives


Download ppt "Transact-SQL 語言設計教學."

Similar presentations


Ads by Google