Muutke küpsiste eelistusi

E-raamat: T-SQL Fundamentals

  • Formaat: 464 pages
  • Sari: Developer Reference
  • Ilmumisaeg: 29-Jul-2016
  • Kirjastus: Microsoft Press
  • Keel: eng
  • ISBN-13: 9781509302024
Teised raamatud teemal:
  • Formaat - EPUB+DRM
  • Hind: 31,58 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 464 pages
  • Sari: Developer Reference
  • Ilmumisaeg: 29-Jul-2016
  • Kirjastus: Microsoft Press
  • Keel: eng
  • ISBN-13: 9781509302024
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Effectively query and modify data using Transact-SQL Master T-SQL fundamentals and write robust code for Microsoft SQL Server and Azure SQL Database. Itzik Ben-Gan explains key T-SQL concepts and helps you apply your knowledge with hands-on exercises. The book first introduces T-SQLs roots and underlying logic. Next, it walks you through core topics such as single-table queries, joins, subqueries, table expressions, and set operators. Then the book covers more-advanced data-query topics such as window functions, pivoting, and grouping sets. The book also explains how to modify data, work with temporal tables, and handle transactions, and provides an overview of programmable objects.







Microsoft Data Platform MVP Itzik Ben-Gan shows you how to:





Review core SQL concepts and its mathematical roots Create tables and enforce data integrity Perform effective single-table queries by using the SELECT statement Query multiple tables by using joins, subqueries, table expressions, and set operators Use advanced query techniques such as window functions, pivoting, and grouping sets Insert, update, delete, and merge data Use transactions in a concurrent environment Get started with programmable objectsfrom variables and batches to user-defined functions, stored procedures, triggers, and dynamic SQL
Introduction xix
Chapter 1 Background to T-SQL querying and programming 1(26)
Theoretical background
1(11)
SQL
2(1)
Set theory
3(1)
Predicate logic
4(1)
The relational model
4(6)
Types of database systems
10(2)
SQL Server architecture
12(7)
The ABCs of Microsoft RDBMS flavors
12(2)
SQL Server instances
14(1)
Databases
15(3)
Schemas and objects
18(1)
Creating tables and defining data integrity
19(6)
Creating tables
20(2)
Defining data integrity
22(3)
Conclusion
25(2)
Chapter 2 Single-table queries 27(76)
Elements of the SELECT statement
27(22)
The FROM clause
29(2)
The WHERE clause
31(1)
The GROUP BY clause
32(3)
The HAVING clause
35(1)
The SELECT clause
36(5)
The ORDER BY clause
41(2)
The TOP and OFFSET-FETCH filters
43(4)
A quick look at window functions
47(2)
Predicates and operators
49(3)
CASE expressions
52(2)
NULLS
54(4)
All-at-once operations
58(2)
Working with character data
60(13)
Data types
60(1)
Collation
61(2)
Operators and functions
63(8)
The LIKE predicate
71(2)
Working with date and time data
73(16)
Date and time data types
74(1)
Literals
74(4)
Working with date and time separately
78(1)
Filtering date ranges
79(1)
Date and time functions
80(9)
Querying metadata
89(4)
Catalog views
90(1)
Information schema views
91(1)
System stored procedures and functions
91(2)
Conclusion
93(1)
Exercises
93(4)
Exercise 1
93(1)
Exercise 2
93(1)
Exercise 3
94(1)
Exercise 4
94(1)
Exercise 5
95(1)
Exercise 6
95(1)
Exercise 7
95(1)
Exercise 8
96(1)
Exercise 9
96(1)
Exercise 10
97(1)
Solutions
97(6)
Exercise 1
98(1)
Exercise 2
98(1)
Exercise 3
99(1)
Exercise 4
99(1)
Exercise 5
99(1)
Exercise 6
100(1)
Exercise 7
101(1)
Exercise 8
102(1)
Exercise 9
102(1)
Exercise 10
102(1)
Chapter 3 Joins 103(30)
Cross joins
103(4)
ISO/ANSI SQL-92 syntax
104(1)
ISO/ANSI SQL-89 syntax
105(1)
Self cross joins
105(1)
Producing tables of numbers
106(1)
Inner joins
107(2)
ISO/ANSI SQL-92 syntax
107(1)
ISO/ANSI SQL-89 syntax
108(1)
Inner join safety
109(1)
More join examples
109(4)
Composite joins
110(1)
Non-equi joins
111(2)
Multi-join queries
113(1)
Outer joins
113(10)
Fundamentals of outer joins
114(2)
Beyond the fundamentals of outer joins
116(7)
Conclusion
123(1)
Exercises
123(6)
Exercise 1-1
123(1)
Exercise 1-2 (optional, advanced)
124(1)
Exercise 2
125(1)
Exercise 3
125(1)
Exercise 4
126(1)
Exercise 5
126(1)
Exercise 6
127(1)
Exercise 7 (optional, advanced)
127(1)
Exercise 8 (optional, advanced)
128(1)
Exercise 9 (optional, advanced)
128(1)
Solutions
129(4)
Exercise 1-1
129(1)
Exercise 1-2
129(1)
Exercise 2
129(1)
Exercise 3
130(1)
Exercise 4
130(1)
Exercise 5
131(1)
Exercise 6
131(1)
Exercise 7
131(1)
Exercise 8
132(1)
Exercise 9
132(1)
Chapter 4 Subqueries 133(28)
Self-contained subqueries
133(6)
Self-contained scalar subquery examples
134(2)
Self-contained multivalued subquery examples
136(3)
Correlated subqueries
139(4)
The EXISTS predicate
141(2)
Beyond the fundamentals of subqueries
143(6)
Returning previous or next values
143(1)
Using running aggregates
144(1)
Dealing with misbehaving subqueries
145(4)
Conclusion
149(1)
Exercises
150(4)
Exercise 1
150(1)
Exercise 2 (optional, advanced)
150(1)
Exercise 3
151(1)
Exercise 4
151(1)
Exercise 5
152(1)
Exercise 6
152(1)
Exercise 7 (optional, advanced)
153(1)
Exercise 8 (optional, advanced)
153(1)
Exercise 9
154(1)
Exercise 10 (optional, advanced)
154(1)
Solutions
154(7)
Exercise 1
154(1)
Exercise 2
155(1)
Exercise 3
155(1)
Exercise 4
155(1)
Exercise 5
156(1)
Exercise 6
156(1)
Exercise 7
156(1)
Exercise 8
157(1)
Exercise 9
157(1)
Exercise 10
158(3)
Chapter 5 Table expressions 161(32)
Derived tables
161(6)
Assigning column aliases
163(1)
Using arguments
164(1)
Nesting
165(1)
Multiple references
166(1)
Common table expressions
167(4)
Assigning column aliases in CTEs
167(1)
Using arguments in CTEs
168(1)
Defining multiple CTEs
168(1)
Multiple references in CTEs
169(1)
Recursive CTEs
169(2)
Views
171(7)
Views and the ORDER BY clause
172(3)
View options
175(3)
Inline table-valued functions
178(2)
The APPLY operator
180(3)
Conclusion
183(1)
Exercises
183(5)
Exercise 1
183(1)
Exercise 2-1
184(1)
Exercise 2-2
184(1)
Exercise 3-1
184(1)
Exercise 3-2
185(1)
Exercise 4 (optional, advanced)
185(1)
Exercise 5-1
186(1)
Exercise 5-2 (optional, advanced)
187(1)
Exercise 6-1
187(1)
Exercise 6-2
188(1)
Solutions
188(5)
Exercise 1
188(1)
Exercise 2-1
189(1)
Exercise 2-2
189(1)
Exercise 3-1
189(1)
Exercise 3-2
189(1)
Exercise 4
190(1)
Exercise 5-1
190(1)
Exercise 5-2
191(1)
Exercise 6-1
191(1)
Exercise 6-2
192(1)
Chapter 6 Set operators 193(20)
The UNION operator
194(2)
The UNION ALL operator
194(1)
The UNION (DISTINCT) operator
195(1)
The INTERSECT Operator
196(3)
The INTERSECT (DISTINCT) operator
196(1)
The INTERSECT ALL operator
197(2)
The EXCEPT operator
199(2)
The EXCEPT (DISTINCT) operator
199(1)
The EXCEPT ALL operator
200(1)
Precedence
201(2)
Circumventing unsupported logical phases
203(1)
Conclusion
204(1)
Exercises
204(4)
Exercise 1
204(1)
Exercise 2
205(1)
Exercise 3
205(1)
Exercise 4
206(1)
Exercise 5
207(1)
Exercise 6 (optional, advanced)
207(1)
Solutions
208(5)
Exercise 1
208(1)
Exercise 2
208(1)
Exercise 3
209(1)
Exercise 4
210(1)
Exercise 5
210(1)
Exercise 6
211(2)
Chapter 7 Beyond the fundamentals of querying 213(36)
Window functions
213(11)
Ranking window functions
216(3)
Offset window functions
219(2)
Aggregate window functions
221(3)
Pivoting data
224(6)
Pivoting with a grouped query
226(1)
Pivoting with the PIVOT operator
227(3)
Unpivoting data
230(4)
Unpivoting with the APPLY operator
231(2)
Unpivoting with the UNPIVOT operator
233(1)
Grouping sets
234(6)
The GROUPING SETS subclause
236(1)
The CUBE subclause
236(1)
The ROLLUP subclause
236(2)
The GROUPING and GROUPING ID functions
238(2)
Conclusion
240(1)
Exercises
241(4)
Exercise 1
241(1)
Exercise 2
241(1)
Exercise 3
242(1)
Exercise 4
242(1)
Exercise 5
243(1)
Exercise 6
244(1)
Solutions
245(4)
Exercise 1
245(1)
Exercise 2
245(1)
Exercise 3
245(1)
Exercise 4
246(1)
Exercise 5
247(1)
Exercise 6
247(2)
Chapter 8 Data modification 249(48)
Inserting data
249(13)
The INSERT VALUES statement
249(2)
The INSERT SELECT statement
251(1)
The INSERT EXEC statement
251(1)
The SELECT INTO statement
252(1)
The BULK INSERT statement
253(1)
The identity property and the sequence object
254(8)
Deleting data
262(4)
The DELETE statement
263(1)
The TRUNCATE statement
264(1)
DELETE based on a join
265(1)
Updating data
266(5)
The UPDATE statement
267(1)
UPDATE based on a join
268(2)
Assignment UPDATE
270(1)
Merging data
271(5)
Modifying data through table expressions
276(2)
Modifications with TOP and OFFSET-FETCH
278(2)
The OUTPUT clause
280(7)
INSERT with OUTPUT
280(2)
DELETE with OUTPUT
282(1)
UPDATE with OUTPUT
283(1)
MERGE with OUTPUT
284(1)
Nested DML
285(2)
Conclusion
287(1)
Exercises
287(4)
Exercise 1
287(1)
Exercise 2
288(1)
Exercise 3
288(1)
Exercise 4
288(2)
Exercise 5
290(1)
Exercise 6
290(1)
Solutions
291(6)
Exercise 1
291(2)
Exercise 2
293(1)
Exercise 3
293(1)
Exercise 4
294(1)
Exercise 5
294(1)
Exercise 6
295(2)
Chapter 9 Temporal tables 297(22)
Creating tables
298(3)
Modifying data
301(3)
Querying data
304(7)
Conclusion
311(1)
Exercises
311(2)
Exercise 1
311(1)
Exercise 2
311(1)
Exercise 3
312(1)
Exercise 4
313(1)
Solutions
313(6)
Exercise 1
313(1)
Exercise 2
314(2)
Exercise 3
316(1)
Exercise 4
317(2)
Chapter 10 Transactions and concurrency 319(42)
Transactions
319(3)
Locks and blocking
322(10)
Locks
322(3)
Troubleshooting blocking
325(7)
Isolation levels
332(13)
The READ UNCOMMITTED isolation level
333(1)
The READ COMMITTED isolation level
334(1)
The REPEATABLE READ isolation level
335(2)
The SERIALIZABLE isolation level
337(2)
Isolation levels based on row versioning
339(6)
Summary of isolation levels
345(1)
Deadlocks
345(3)
Conclusion
348(1)
Exercises
348(13)
Exercise 1-1
349(1)
Exercise 1-2
349(1)
Exercise 1-3
349(1)
Exercise 1-4
349(1)
Exercise 1-5
350(1)
Exercise 1-6
350(1)
Exercise 2-1
350(1)
Exercise 2-2
351(1)
Exercise 2-3
352(1)
Exercise 2-4
353(1)
Exercise 2-5
354(2)
Exercise 2-6
356(1)
Exercise 3-1
357(1)
Exercise 3-2
358(1)
Exercise 3-3
358(1)
Exercise 3-4
358(1)
Exercise 3-5
358(1)
Exercise 3-6
358(1)
Exercise 3-7
359(2)
Chapter 11 Programmable objects 361(34)
Variables
361(2)
Batches
363(4)
A batch as a unit of parsing
364(1)
Batches and variables
365(1)
Statements that cannot be combined in the same batch
365(1)
A batch as a unit of resolution
366(1)
The GO n option
366(1)
Flow elements
367(3)
The IF... ELSE flow element
367(1)
The WHILE flow element
368(2)
Cursors
370(4)
Temporary tables
374(5)
Local temporary tables
374(2)
Global temporary tables
376(1)
Table variables
377(1)
Table types
378(1)
Dynamic SQL
379(4)
The EXEC command
380(1)
The sp executesql stored procedure
380(1)
Using PIVOT with Dynamic SQL
381(2)
Routines
383(7)
User-defined functions
383(2)
Stored procedures
385(2)
Triggers
387(3)
Error handling
390(4)
Conclusion
394(1)
Appendix: Getting started 395(20)
Index 415
TZIK BEN-GAN is a mentor with and co-founder of SolidQ. A Microsoft Data Platform MVP since 1999, Itzik has taught numerous training events around the world focused on T-SQL querying, query tuning, and programming. Itzik is the author of several books about T-SQL. He has written many articles for SQL Server Pro as well as articles and white papers for MSDN and The SolidQ Journal. Itziks speaking engagements include Tech-Ed, SQL PASS, SQL Server Connections, presentations to various SQL Server user groups, and SolidQ events.

Itzik is a subject-matter expert within SolidQ for its T-SQL related activities. He authored SolidQs Advanced T-SQL and T-SQL Fundamentals courses and delivers them regularly worldwide. You can learn more about Itzik at http://tsql.solidq.com/.