Microsoft SQL Server Notes for Professionals book

    Amazing collection of free programming books

    Collecting
    Free
    Amazing collection of free programming books

    The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified

    Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners

    https://goalkicker.com/

    Content

    • 1-1
      Content list
    • 1-2
      About
    • 1-3
      Chapter 1: Getting started with Microsoft SQL Server
    • 1-4
      Section 1.1: INSERT / SELECT / UPDATE / DELETE: the basics of Data Manipulation Language
    • 1-5
      Section 1.2: SELECT all rows and columns from a table
    • 1-6
      Section 1.3: UPDATE Specific Row
    • 1-7
      Section 1.4: DELETE All Rows
    • 1-8
      Section 1.5: Comments in code
    • 1-9
      Section 1.6: PRINT
    • 1-10
      Section 1.7: Select rows that match a condition
    • 1-11
      Section 1.8: UPDATE All Rows
    • 1-12
      Section 1.9: TRUNCATE TABLE
    • 1-13
      Section 1.10: Retrieve Basic Server Information
    • 1-14
      Section 1.11: Create new table and insert records from old table
    • 1-15
      Section 1.12: Using Transactions to change data safely
    • 1-16
      Section 1.13: Getting Table Row Count
    • 1-17
      Chapter 2: Data Types
    • 1-18
      Section 2.1: Exact Numerics
    • 1-19
      Section 2.2: Approximate Numerics
    • 1-20
      Section 2.3: Date and Time
    • 1-21
      Section 2.4: Character Strings
    • 1-22
      Section 2.5: Unicode Character Strings
    • 1-23
      Section 2.6: Binary Strings
    • 1-24
      Section 2.7: Other Data Types
    • 1-25
      Chapter 3: Converting data types
    • 1-26
      Section 3.1: TRY PARSE
    • 1-27
      Section 3.2: TRY CONVERT
    • 1-28
      Section 3.3: TRY CAST
    • 1-29
      Section 3.4: Cast
    • 1-30
      Section 3.5: Convert
    • 1-31
      Chapter 4: User Defined Table Types
    • 1-32
      Section 4.1: creating a UDT with a single int column that is also a primary key
    • 1-33
      Section 4.2: Creating a UDT with multiple columns
    • 1-34
      Section 4.3: Creating a UDT with a unique constraint:
    • 1-35
      Section 4.4: Creating a UDT with a primary key and a column with a default value:
    • 1-36
      Chapter 5: SELECT statement
    • 1-37
      Section 5.1: Basic SELECT from table
    • 1-38
      Section 5.2: Filter rows using WHERE clause
    • 1-39
      Section 5.3: Sort results using ORDER BY
    • 1-40
      Section 5.4: Group result using GROUP BY
    • 1-41
      Section 5.5: Filter groups using HAVING clause
    • 1-42
      Section 5.6: Returning only first N rows
    • 1-43
      Section 5.7: Pagination using OFFSET FETCH
    • 1-44
      Section 5.8: SELECT without FROM (no data souce)
    • 1-45
      Chapter 6: Alias Names in SQL Server
    • 1-46
      Section 6.1: Giving alias after Derived table name
    • 1-47
      Section 6.2: Using AS
    • 1-48
      Section 6.3: Using =
    • 1-49
      Section 6.4: Without using AS
    • 1-50
      Chapter 7: NULLs
    • 1-51
      Section 7.1: COALESCE ()
    • 1-52
      Section 7.2: ANSI NULLS
    • 1-53
      Section 7.3: ISNULL()
    • 1-54
      Section 7.4: Is null / Is not null
    • 1-55
      Section 7.5: NULL comparison
    • 1-56
      Section 7.6: NULL with NOT IN SubQuery
    • 1-57
      Chapter 8: Variables
    • 1-58
      Section 8.1: Declare a Table Variable
    • 1-59
      Section 8.2: Updating variables using SELECT
    • 1-60
      Section 8.3: Declare multiple variables at once, with initial values
    • 1-61
      Section 8.4: Updating a variable using SET
    • 1-62
      Section 8.5: Updating variables by selecting from a table
    • 1-63
      Section 8.6: Compound assignment operators
    • 1-64
      Chapter 9: Dates
    • 1-65
      Section 9.1: Date & Time Formatting using CONVERT
    • 1-66
      Section 9.2: Date & Time Formatting using FORMAT
    • 1-67
      Section 9.3: DATEADD for adding and subtracting time periods
    • 1-68
      Section 9.4: Create function to calculate a person's age on a specific date
    • 1-69
      Section 9.5: Get the current DateTime
    • 1-70
      Section 9.6: Getting the last day of a month
    • 1-71
      Section 9.7: CROSS PLATFORM DATE OBJECT
    • 1-72
      Section 9.8: Return just Date from a DateTime
    • 1-73
      Section 9.9: DATEDIFF for calculating time period dierences
    • 1-74
      Section 9.10: DATEPART & DATENAME
    • 1-75
      Section 9.11: Date parts reference
    • 1-76
      Section 9.12: Date Format Extended
    • 1-77
      Chapter 10: Generating a range of dates
    • 1-78
      Section 10.1: Generating Date Range With Recursive CTE
    • 1-79
      Section 10.2: Generating a Date Range With a Tally Table
    • 1-80
      Chapter 11: Database Snapshots
    • 1-81
      Section 11.1: Create a database snapshot
    • 1-82
      Section 11.2: Restore a database snapshot
    • 1-83
      Section 11.3: DELETE Snapshot
    • 1-84
      Chapter 12: COALESCE
    • 1-85
      Section 12.1: Using COALESCE to Build Comma-Delimited String
    • 1-86
      Section 12.2: Getting the first not null from a list of column values
    • 1-87
      Section 12.3: Coalesce basic Example
    • 1-88
      Chapter 13: IF...ELSE
    • 1-89
      Section 13.1: Single IF statement
    • 1-90
      Section 13.2: Multiple IF Statements
    • 1-91
      Section 13.3: Single IF..ELSE statement
    • 1-92
      Section 13.4: Multiple IF... ELSE with final ELSE Statements
    • 1-93
      Section 13.5: Multiple IF...ELSE Statements
    • 1-94
      Chapter 14: CASE Statement
    • 1-95
      Section 14.1: Simple CASE statement
    • 1-96
      Section 14.2: Searched CASE statement
    • 1-97
      Chapter 15: INSERT INTO
    • 1-98
      Section 15.1: INSERT multiple rows of data
    • 1-99
      Section 15.2: Use OUTPUT to get the new Id
    • 1-100
      Section 15.3: INSERT from SELECT Query Results
    • 1-101
      Section 15.4: INSERT a single row of data
    • 1-102
      Section 15.5: INSERT on specific columns
    • 1-103
      Section 15.6: INSERT Hello World INTO table
    • 1-104
      Chapter 16: MERGE
    • 1-105
      Section 16.1: MERGE to Insert / Update / Delete
    • 1-106
      Section 16.2: Merge Using CTE Source
    • 1-107
      Section 16.3: Merge Example - Synchronize Source And Target Table
    • 1-108
      Section 16.4: MERGE using Derived Source Table
    • 1-109
      Section 16.5: Merge using EXCEPT
    • 1-110
      Chapter 17: CREATE VIEW
    • 1-111
      Section 17.1: CREATE Indexed VIEW
    • 1-112
      Section 17.2: CREATE VIEW
    • 1-113
      Section 17.3: CREATE VIEW With Encryption
    • 1-114
      Section 17.4: CREATE VIEW With INNER JOIN
    • 1-115
      Section 17.5: Grouped VIEWs
    • 1-116
      Section 17.6: UNION-ed VIEWs
    • 1-117
      Chapter 18: Views
    • 1-118
      Section 18.1: Create a view with schema binding
    • 1-119
      Section 18.2: Create a view
    • 1-120
      Section 18.3: Create or replace view
    • 1-121
      Chapter 19: UNION
    • 1-122
      Section 19.1: Union and union all
    • 1-123
      Chapter 20: TRY/CATCH
    • 1-124
      Section 20.1: Transaction in a TRY/CATCH
    • 1-125
      Section 20.2: Raising errors in try-catch block
    • 1-126
      Section 20.3: Raising info messages in try catch block
    • 1-127
      Section 20.4: Re-throwing exception generated by RAISERROR
    • 1-128
      Section 20.5: Throwing exception in TRY/CATCH blocks
    • 1-129
      Chapter 21: WHILE loop
    • 1-130
      Section 21.1: Using While loop
    • 1-131
      Section 21.2: While loop with min aggregate function usage
    • 1-132
      Chapter 22: OVER Clause
    • 1-133
      Section 22.1: Cumulative Sum
    • 1-134
      Section 22.2: Using Aggregation functions with OVER
    • 1-135
      Section 22.3: Dividing Data into equally-partitioned buckets using NTILE
    • 1-136
      Section 22.4: Using Aggregation funtions to find the most recent records
    • 1-137
      Chapter 23: GROUP BY
    • 1-138
      Section 23.1: Simple Grouping
    • 1-139
      Section 23.2: GROUP BY multiple columns
    • 1-140
      Section 23.3: GROUP BY with ROLLUP and CUBE
    • 1-141
      Section 23.4: Group by with multiple tables, multiple columns
    • 1-142
      Section 23.5: HAVING
    • 1-143
      Chapter 24: ORDER BY
    • 1-144
      Section 24.1: Simple ORDER BY clause
    • 1-145
      Section 24.2: ORDER BY multiple fields
    • 1-146
      Section 24.3: Custom Ordering
    • 1-147
      Section 24.4: ORDER BY with complex logic
    • 1-148
      Chapter 25: The STUFF Function
    • 1-149
      Section 25.1: Using FOR XML to Concatenate Values from Multiple Rows
    • 1-150
      Section 25.2: Basic Character Replacement with STUFF()
    • 1-151
      Section 25.3: Basic Example of STUFF() function
    • 1-152
      Section 25.4: stu for comma separated in sql server
    • 1-153
      Section 25.5: Obtain column names separated with comma (not a list)
    • 1-154
      Chapter 26: JSON in SQL Server
    • 1-155
      Section 26.1: Index on JSON properties by using computed columns
    • 1-156
      Section 26.2: Join parent and child JSON entities using CROSS APPLY OPENJSON
    • 1-157
      Section 26.3: Format Query Results as JSON with FOR JSON
    • 1-158
      Section 26.4: Parse JSON text
    • 1-159
      Section 26.5: Format one table row as a single JSON object using FOR JSON
    • 1-160
      Section 26.6: Parse JSON text using OPENJSON function
    • 1-161
      Chapter 27: OPENJSON
    • 1-162
      Section 27.1: Transform JSON array into set of rows
    • 1-163
      Section 27.2: Get key:value pairs from JSON text
    • 1-164
      Section 27.3: Transform nested JSON fields into set of rows
    • 1-165
      Section 27.4: Extracting inner JSON sub-objects
    • 1-166
      Section 27.5: Working with nested JSON sub-arrays
    • 1-167
      Chapter 28: FOR JSON
    • 1-168
      Section 28.1: FOR JSON PATH
    • 1-169
      Section 28.2: FOR JSON PATH with column aliases
    • 1-170
      Section 28.3: FOR JSON clause without array wrapper (single object in output)
    • 1-171
      Section 28.4: INCLUDE_NULL_VALUES
    • 1-172
      Section 28.5: Wrapping results with ROOT object
    • 1-173
      Section 28.6: FOR JSON AUTO
    • 1-174
      Section 28.7: Creating custom nested JSON structure
    • 1-175
      Chapter 29: Queries with JSON data
    • 1-176
      Section 29.1: Using values from JSON in query
    • 1-177
      Section 29.2: Using JSON values in reports
    • 1-178
      Section 29.3: Filter-out bad JSON text from query results
    • 1-179
      Section 29.4: Update value in JSON column
    • 1-180
      Section 29.5: Append new value into JSON array
    • 1-181
      Section 29.6: JOIN table with inner JSON collection
    • 1-182
      Section 29.7: Finding rows that contain value in the JSON array
    • 1-183
      Chapter 30: Storing JSON in SQL tables
    • 1-184
      Section 30.1: JSON stored as text column
    • 1-185
      Section 30.2: Ensure that JSON is properly formatted using ISJSON
    • 1-186
      Section 30.3: Expose values from JSON text as computed columns
    • 1-187
      Section 30.4: Adding index on JSON path
    • 1-188
      Section 30.5: JSON stored in in-memory tables
    • 1-189
      Chapter 31: Modify JSON text
    • 1-190
      Section 31.1: Modify value in JSON text on the specified path
    • 1-191
      Section 31.2: Append a scalar value into a JSON array
    • 1-192
      Section 31.3: Insert new JSON Object in JSON text
    • 1-193
      Section 31.4: Insert new JSON array generated with FOR JSON query
    • 1-194
      Section 31.5: Insert single JSON object generated with FOR JSON clause
    • 1-195
      Chapter 32: FOR XML PATH
    • 1-196
      Section 32.1: Using FOR XML PATH to concatenate values
    • 1-197
      Section 32.2: Specifying namespaces
    • 1-198
      Section 32.3: Specifying structure using XPath expressions
    • 1-199
      Section 32.4: Hello World XML
    • 1-200
      Chapter 33: Join
    • 1-201
      Section 33.1: Inner Join
    • 1-202
      Section 33.2: Outer Join
    • 1-203
      Section 33.3: Using Join in an Update
    • 1-204
      Section 33.4: Join on a Subquery
    • 1-205
      Section 33.5: Cross Join
    • 1-206
      Section 33.6: Self Join
    • 1-207
      Section 33.7: Accidentally turning an outer join into an inner join
    • 1-208
      Section 33.8: Delete using Join
    • 1-209
      Chapter 34: cross apply
    • 1-210
      Section 34.1: Join table rows with dynamically generated rows from a cell
    • 1-211
      Section 34.2: Join table rows with JSON array stored in cell
    • 1-212
      Section 34.3: Filter rows by array values
    • 1-213
      Chapter 35: Computed Columns
    • 1-214
      Section 35.1: A column is computed from an expression
    • 1-215
      Section 35.2: Simple example we normally use in log tables
    • 1-216
      Chapter 36: Common Table Expressions
    • 1-217
      Section 36.1: Generate a table of dates using CTE
    • 1-218
      Section 36.2: Employee Hierarchy
    • 1-219
      Section 36.3: Recursive CTE
    • 1-220
      Section 36.4: Delete duplicate rows using CTE
    • 1-221
      Section 36.5: CTE with multiple AS statements
    • 1-222
      Section 36.6: Find nth highest salary using CTE
    • 1-223
      Chapter 37: Move and copy data around tables
    • 1-224
      Section 37.1: Copy data from one table to another
    • 1-225
      Section 37.2: Copy data into a table, creating that table on the fly
    • 1-226
      Section 37.3: Move data into a table (assuming unique keys method)
    • 1-227
      Chapter 38: Limit Result Set
    • 1-228
      Section 38.1: Limiting With PERCENT
    • 1-229
      Section 38.2: Limiting with FETCH
    • 1-230
      Section 38.3: Limiting With TOP
    • 1-231
      Chapter 39: Retrieve Information about your Instance
    • 1-232
      Section 39.1: General Information about Databases, Tables, Stored procedures and how to search them
    • 1-233
      Section 39.2: Get information on current sessions and query executions
    • 1-234
      Section 39.3: Information about SQL Server version
    • 1-235
      Section 39.4: Retrieve Edition and Version of Instance
    • 1-236
      Section 39.5: Retrieve Instance Uptime in Days
    • 1-237
      Section 39.6: Retrieve Local and Remote Servers
    • 1-238
      Chapter 40: With Ties Option
    • 1-239
      Section 40.1: Test Data
    • 1-240
      Chapter 41: String Functions
    • 1-241
      Section 41.1: Quotename
    • 1-242
      Section 41.2: Replace
    • 1-243
      Section 41.3: Substring
    • 1-244
      Section 41.4: String_Split
    • 1-245
      Section 41.5: Left
    • 1-246
      Section 41.6: Right
    • 1-247
      Section 41.7: Soundex
    • 1-248
      Section 41.8: Format
    • 1-249
      Section 41.9: String_escape
    • 1-250
      Section 41.10: ASCII
    • 1-251
      Section 41.11: Char
    • 1-252
      Section 41.12: Concat
    • 1-253
      Section 41.13: LTrim
    • 1-254
      Section 41.14: RTrim
    • 1-255
      Section 41.15: PatIndex
    • 1-256
      Section 41.16: Space
    • 1-257
      Section 41.17: Dierence
    • 1-258
      Section 41.18: Len
    • 1-259
      Section 41.19: Lower
    • 1-260
      Section 41.20: Upper
    • 1-261
      Section 41.21: Unicode
    • 1-262
      Section 41.22: NChar
    • 1-263
      Section 41.23: Str
    • 1-264
      Section 41.24: Reverse
    • 1-265
      Section 41.25: Replicate
    • 1-266
      Section 41.26: CharIndex
    • 1-267
      Chapter 42: Logical Functions
    • 1-268
      Section 42.1: CHOOSE
    • 1-269
      Section 42.2: IIF
    • 1-270
      Chapter 43: Aggregate Functions
    • 1-271
      Section 43.1: SUM()
    • 1-272
      Section 43.2: AVG()
    • 1-273
      Section 43.3: MAX()
    • 1-274
      Section 43.4: MIN()
    • 1-275
      Section 43.5: COUNT()
    • 1-276
      Section 43.6: COUNT(Column_Name) with GROUP BY Column_Name
    • 1-277
      Chapter 44: String Aggregate functions in SQL Server
    • 1-278
      Section 44.1: Using STUFF for string aggregation
    • 1-279
      Section 44.2: String_Agg for String Aggregation
    • 1-280
      Chapter 45: Ranking Functions
    • 1-281
      Section 45.1: DENSE_RANK ()
    • 1-282
      Section 45.2: RANK()
    • 1-283
      Chapter 46: Window functions
    • 1-284
      Section 46.1: Centered Moving Average
    • 1-285
      Section 46.2: Find the single most recent item in a list of timestamped events
    • 1-286
      Section 46.3: Moving Average of last 30 Items
    • 1-287
      Chapter 47: PIVOT / UNPIVOT
    • 1-288
      Section 47.1: Dynamic PIVOT
    • 1-289
      Section 47.2: Simple PIVOT & UNPIVOT (T-SQL)
    • 1-290
      Section 47.3: Simple Pivot - Static Columns
    • 1-291
      Chapter 48: Dynamic SQL Pivot
    • 1-292
      Section 48.1: Basic Dynamic SQL Pivot
    • 1-293
      Chapter 49: Partitioning
    • 1-294
      Section 49.1: Retrieve Partition Boundary Values
    • 1-295
      Section 49.2: Switching Partitions
    • 1-296
      Section 49.3: Retrieve partition table,column, scheme, function, total and min-max boundry values using single query
    • 1-297
      Chapter 50: Stored Procedures
    • 1-298
      Section 50.1: Creating and executing a basic stored procedure
    • 1-299
      Section 50.2: Stored Procedure with If...Else and Insert Into operation
    • 1-300
      Section 50.3: Dynamic SQL in stored procedure
    • 1-301
      Section 50.4: STORED PROCEDURE with OUT parameters
    • 1-302
      Section 50.5: Simple Looping
    • 1-303
      Section 50.6: Simple Looping
    • 1-304
      Chapter 51: Retrieve information about the database
    • 1-305
      Section 51.1: Retrieve a List of all Stored Procedures
    • 1-306
      Section 51.2: Get the list of all databases on a server
    • 1-307
      Section 51.3: Count the Number of Tables in a Database
    • 1-308
      Section 51.4: Database Files
    • 1-309
      Section 51.5: See if Enterprise-specific features are being used
    • 1-310
      Section 51.6: Determine a Windows Login's Permission Path
    • 1-311
      Section 51.7: Search and Return All Tables and Columns Containing a Specified Column Value
    • 1-312
      Section 51.8: Get all schemas, tables, columns and indexes
    • 1-313
      Section 51.9: Return a list of SQL Agent jobs, with schedule information
    • 1-314
      Section 51.10: Retrieve Tables Containing Known Column
    • 1-315
      Section 51.11: Show Size of All Tables in Current Database
    • 1-316
      Section 51.12: Retrieve Database Options
    • 1-317
      Section 51.13: Find every mention of a field in the database
    • 1-318
      Section 51.14: Retrieve information on backup and restore operations
    • 1-319
      Chapter 52: Split String function in SQL Server
    • 1-320
      Section 52.1: Split string in Sql Server 2008/2012/2014 using XML
    • 1-321
      Section 52.2: Split a String in Sql Server 2016
    • 1-322
      Section 52.3: T-SQL Table variable and XML
    • 1-323
      Chapter 53: Insert
    • 1-324
      Section 53.1: Add a row to a table named Invoices
    • 1-325
      Chapter 54: Primary Keys
    • 1-326
      Section 54.1: Create table w/ identity column as primary key
    • 1-327
      Section 54.2: Create table w/ GUID primary key
    • 1-328
      Section 54.3: Create table w/ natural key
    • 1-329
      Section 54.4: Create table w/ composite key
    • 1-330
      Section 54.5: Add primary key to existing table
    • 1-331
      Section 54.6: Delete primary key
    • 1-332
      Chapter 55: Foreign Keys
    • 1-333
      Section 55.1: Foreign key relationship/constraint
    • 1-334
      Section 55.2: Maintaining relationship between parent/child rows
    • 1-335
      Section 55.3: Adding foreign key relationship on existing table
    • 1-336
      Section 55.4: Add foreign key on existing table
    • 1-337
      Section 55.5: Getting information about foreign key constraints
    • 1-338
      Chapter 56: Last Inserted Identity
    • 1-339
      Section 56.1: @@IDENTITY and MAX(ID)
    • 1-340
      Section 56.2: SCOPE_IDENTITY()
    • 1-341
      Section 56.3: @@IDENTITY
    • 1-342
      Section 56.4: IDENT_CURRENT('tablename')
    • 1-343
      Chapter 57: SCOPE_IDENTITY()
    • 1-344
      Section 57.1: Introduction with Simple Example
    • 1-345
      Chapter 58: Sequences
    • 1-346
      Section 58.1: Create Sequence
    • 1-347
      Section 58.2: Use Sequence in Table
    • 1-348
      Section 58.3: Insert Into Table with Sequence
    • 1-349
      Section 58.4: Delete From & Insert New
    • 1-350
      Chapter 59: Index
    • 1-351
      Section 59.1: Create Clustered index
    • 1-352
      Section 59.2: Drop index
    • 1-353
      Section 59.3: Create Non-Clustered index
    • 1-354
      Section 59.4: Show index info
    • 1-355
      Section 59.5: Returns size and fragmentation indexes
    • 1-356
      Section 59.6: Reorganize and rebuild index
    • 1-357
      Section 59.7: Rebuild or reorganize all indexes on a table
    • 1-358
      Section 59.8: Rebuild all index database
    • 1-359
      Section 59.9: Index on view
    • 1-360
      Section 59.10: Index investigations
    • 1-361
      Chapter 60: Full-Text Indexing
    • 1-362
      Section 60.1: A. Creating a unique index, a full-text catalog, and a full-text index
    • 1-363
      Section 60.2: Creating a full-text index on several table columns
    • 1-364
      Section 60.3: Creating a full-text index with a search property list without populating it
    • 1-365
      Section 60.4: Full-Text Search
    • 1-366
      Chapter 61: Trigger
    • 1-367
      Section 61.1: DML Triggers
    • 1-368
      Section 61.2: Types and classifications of Trigger
    • 1-369
      Chapter 62: Cursors
    • 1-370
      Section 62.1: Basic Forward Only Cursor
    • 1-371
      Section 62.2: Rudimentary cursor syntax
    • 1-372
      Chapter 63: Transaction isolation levels
    • 1-373
      Section 63.1: Read Committed
    • 1-374
      Section 63.2: What are "dirty reads"?
    • 1-375
      Section 63.3: Read Uncommitted
    • 1-376
      Section 63.4: Repeatable Read
    • 1-377
      Section 63.5: Snapshot
    • 1-378
      Section 63.6: Serializable
    • 1-379
      Chapter 64: Advanced options
    • 1-380
      Section 64.1: Enable and show advanced options
    • 1-381
      Section 64.2: Enable backup compression default
    • 1-382
      Section 64.3: Enable cmd permission
    • 1-383
      Section 64.4: Set default fill factor percent
    • 1-384
      Section 64.5: Set system recovery interval
    • 1-385
      Section 64.6: Set max server memory size
    • 1-386
      Section 64.7: Set number of checkpoint tasks
    • 1-387
      Chapter 65: Migration
    • 1-388
      Section 65.1: How to generate migration scripts
    • 1-389
      Chapter 66: Table Valued Parameters
    • 1-390
      Section 66.1: Using a table valued parameter to insert multiple rows to a table
    • 1-391
      Chapter 67: DBMAIL
    • 1-392
      Section 67.1: Send simple email
    • 1-393
      Section 67.2: Send results of a query
    • 1-394
      Section 67.3: Send HTML email
    • 1-395
      Chapter 68: In-Memory OLTP (Hekaton)
    • 1-396
      Section 68.1: Declare Memory-Optimized Table Variables
    • 1-397
      Section 68.2: Create Memory Optimized Table
    • 1-398
      Section 68.3: Show created .dll files and tables for Memory Optimized Tables
    • 1-399
      Section 68.4: Create Memory Optimized System-Versioned Temporal Table
    • 1-400
      Section 68.5: Memory-Optimized Table Types and Temp tables
    • 1-401
      Chapter 69: Temporal Tables
    • 1-402
      Section 69.1: CREATE Temporal Tables
    • 1-403
      Section 69.2: FOR SYSTEM_TIME ALL
    • 1-404
      Section 69.3: Creating a Memory-Optimized System-Versioned Temporal Table and cleaning up the SQL Server history table
    • 1-405
      Section 69.4: FOR SYSTEM_TIME BETWEEN <start_date_time> AND <end_date_time>
    • 1-406
      Section 69.5: FOR SYSTEM_TIME FROM <start_date_time> TO <end_date_time>
    • 1-407
      Section 69.6: FOR SYSTEM_TIME CONTAINED IN (<start_date_time> , <end_date_time>)
    • 1-408
      Section 69.7: How do I query temporal data?
    • 1-409
      Section 69.8: Return actual value specified point in time(FOR SYSTEM_TIME AS OF <date_time>)
    • 1-410
      Chapter 70: Use of TEMP Table
    • 1-411
      Section 70.1: Dropping temp tables
    • 1-412
      Section 70.2: Local Temp Table
    • 1-413
      Section 70.3: Global Temp Table
    • 1-414
      Chapter 71: Scheduled Task or Job
    • 1-415
      Section 71.1: Create a scheduled Job
    • 1-416
      Chapter 72: Isolation levels and locking
    • 1-417
      Section 72.1: Examples of setting the isolation level
    • 1-418
      Chapter 73: Sorting/ordering rows
    • 1-419
      Section 73.1: Basics
    • 1-420
      Section 73.2: Order by Case
    • 1-421
      Chapter 74: Privileges or Permissions
    • 1-422
      Section 74.1: Simple rules
    • 1-423
      Chapter 75: SQLCMD
    • 1-424
      Section 75.1: SQLCMD.exe called from a batch file or command line
    • 1-425
      Chapter 76: Resource Governor
    • 1-426
      Section 76.1: Reading the Statistics
    • 1-427
      Chapter 77: File Group
    • 1-428
      Section 77.1: Create filegroup in database
    • 1-429
      Chapter 78: Basic DDL Operations in MS SQL Server
    • 1-430
      Section 78.1: Getting started
    • 1-431
      Chapter 79: Subqueries
    • 1-432
      Section 79.1: Subqueries
    • 1-433
      Chapter 80: Pagination
    • 1-434
      Section 80.1: Pagination with OFFSET FETCH
    • 1-435
      Section 80.2: Paginaton with inner query
    • 1-436
      Section 80.3: Paging in Various Versions of SQL Server
    • 1-437
      Section 80.4: SQL Server 2012/2014 using ORDER BY OFFSET and FETCH NEXT
    • 1-438
      Section 80.5: Pagination using ROW_NUMBER with a Common Table Expression
    • 1-439
      Chapter 81: CLUSTERED COLUMNSTORE
    • 1-440
      Section 81.1: Adding clustered columnstore index on existing table
    • 1-441
      Section 81.2: Rebuild CLUSTERED COLUMNSTORE index
    • 1-442
      Section 81.3: Table with CLUSTERED COLUMNSTORE index
    • 1-443
      Chapter 82: Parsename
    • 1-444
      Section 82.1: PARSENAME
    • 1-445
      Chapter 83: Installing SQL Server on Windows
    • 1-446
      Section 83.1: Introduction
    • 1-447
      Chapter 84: Analyzing a Query
    • 1-448
      Section 84.1: Scan vs Seek
    • 1-449
      Chapter 85: Query Hints
    • 1-450
      Section 85.1: JOIN Hints
    • 1-451
      Section 85.2: GROUP BY Hints
    • 1-452
      Section 85.3: FAST rows hint
    • 1-453
      Section 85.4: UNION hints
    • 1-454
      Section 85.5: MAXDOP Option
    • 1-455
      Section 85.6: INDEX Hints
    • 1-456
      Chapter 86: Query Store
    • 1-457
      Section 86.1: Enable query store on database
    • 1-458
      Section 86.2: Get execution statistics for SQL queries/plans
    • 1-459
      Section 86.3: Remove data from query store
    • 1-460
      Section 86.4: Forcing plan for query
    • 1-461
      Chapter 87: Querying results by page
    • 1-462
      Section 87.1: Row_Number()
    • 1-463
      Chapter 88: Schemas
    • 1-464
      Section 88.1: Purpose
    • 1-465
      Section 88.2: Creating a Schema
    • 1-466
      Section 88.3: Alter Schema
    • 1-467
      Section 88.4: Dropping Schemas
    • 1-468
      Chapter 89: Backup and Restore Database
    • 1-469
      Section 89.1: Basic Backup to disk with no options
    • 1-470
      Section 89.2: Basic Restore from disk with no options
    • 1-471
      Section 89.3: RESTORE Database with REPLACE
    • 1-472
      Chapter 90: Transaction handling
    • 1-473
      Section 90.1: basic transaction skeleton with error handling
    • 1-474
      Chapter 91: Natively compiled modules (Hekaton)
    • 1-475
      Section 91.1: Natively compiled stored procedure
    • 1-476
      Section 91.2: Natively compiled scalar function
    • 1-477
      Section 91.3: Native inline table value function
    • 1-478
      Chapter 92: Spatial Data
    • 1-479
      Section 92.1: POINT
    • 1-480
      Chapter 93: Dynamic SQL
    • 1-481
      Section 93.1: Execute SQL statement provided as string
    • 1-482
      Section 93.2: Dynamic SQL executed as dierent user
    • 1-483
      Section 93.3: SQL Injection with dynamic SQL
    • 1-484
      Section 93.4: Dynamic SQL with parameters
    • 1-485
      Chapter 94: Dynamic data masking
    • 1-486
      Section 94.1: Adding default mask on the column
    • 1-487
      Section 94.2: Mask email address using Dynamic data masking
    • 1-488
      Section 94.3: Add partial mask on column
    • 1-489
      Section 94.4: Showing random value from the range using random() mask
    • 1-490
      Section 94.5: Controlling who can see unmasked data
    • 1-491
      Chapter 95: Export data in txt file by using SQLCMD
    • 1-492
      Section 95.1: By using SQLCMD on Command Prompt
    • 1-493
      Chapter 96: Common Language Runtime Integration
    • 1-494
      Section 96.1: Enable CLR on database
    • 1-495
      Section 96.2: Adding .dll that contains Sql CLR modules
    • 1-496
      Section 96.3: Create CLR Function in SQL Server
    • 1-497
      Section 96.4: Create CLR User-defined type in SQL Server
    • 1-498
      Section 96.5: Create CLR procedure in SQL Server
    • 1-499
      Chapter 97: Delimiting special characters and reserved words
    • 1-500
      Section 97.1: Basic Method
    • 1-501
      Chapter 98: DBCC
    • 1-502
      Section 98.1: DBCC statement
    • 1-503
      Section 98.2: DBCC maintenance commands
    • 1-504
      Section 98.3: DBCC validation statements
    • 1-505
      Section 98.4: DBCC informational statements
    • 1-506
      Section 98.5: DBCC Trace commands
    • 1-507
      Chapter 99: BULK Import
    • 1-508
      Section 99.1: BULK INSERT
    • 1-509
      Section 99.2: BULK INSERT with options
    • 1-510
      Section 99.3: Reading entire content of file using OPENROWSET(BULK)
    • 1-511
      Section 99.4: Read file using OPENROWSET(BULK) and format file
    • 1-512
      Section 99.5: Read json file using OPENROWSET(BULK)
    • 1-513
      Chapter 100: Service broker
    • 1-514
      Section 100.1: Basics
    • 1-515
      Section 100.2: Enable service broker on database
    • 1-516
      Section 100.3: Create basic service broker construction on database (single database communication)
    • 1-517
      Section 100.4: How to send basic communication through service broker
    • 1-518
      Section 100.5: How to receive conversation from TargetQueue automatically
    • 1-519
      Chapter 101: Permissions and Security
    • 1-520
      Section 101.1: Assign Object Permissions to a user
    • 1-521
      Chapter 102: Database permissions
    • 1-522
      Section 102.1: Changing permissions
    • 1-523
      Section 102.2: CREATE USER
    • 1-524
      Section 102.3: CREATE ROLE
    • 1-525
      Section 102.4: Changing role membership
    • 1-526
      Chapter 103: Row-level security
    • 1-527
      Section 103.1: RLS filter predicate
    • 1-528
      Section 103.2: Altering RLS security policy
    • 1-529
      Section 103.3: Preventing updated using RLS block predicate
    • 1-530
      Chapter 104: Encryption
    • 1-531
      Section 104.1: Encryption by certificate
    • 1-532
      Section 104.2: Encryption of database
    • 1-533
      Section 104.3: Encryption by symmetric key
    • 1-534
      Section 104.4: Encryption by passphrase
    • 1-535
      Chapter 105: PHANTOM read
    • 1-536
      Section 105.1: Isolation level READ UNCOMMITTED
    • 1-537
      Chapter 106: Filestream
    • 1-538
      Section 106.1: Example
    • 1-539
      Chapter 107: bcp (bulk copy program) Utility
    • 1-540
      Section 107.1: Example to Import Data without a Format File(using Native Format )
    • 1-541
      Chapter 108: SQL Server Evolution through dierent versions (2000 - 2016)
    • 1-542
      Section 108.1: SQL Server Version 2000 - 2016
    • 1-543
      Chapter 109: SQL Server Management Studio (SSMS)
    • 1-544
      Section 109.1: Refreshing the IntelliSense cache
    • 1-545
      Chapter 110: Managing Azure SQL Database
    • 1-546
      Section 110.1: Find service tier information for Azure SQL Database
    • 1-547
      Section 110.2: Change service tier of Azure SQL Database
    • 1-548
      Section 110.3: Replication of Azure SQL Database
    • 1-549
      Section 110.4: Create Azure SQL Database in Elastic pool
    • 1-550
      Chapter 111: System database - TempDb
    • 1-551
      Section 111.1: Identify TempDb usage
    • 1-552
      Section 111.2: TempDB database details
    • 1-553
      Appendix A: Microsoft SQL Server Management Studio Shortcut Keys
    • 1-554
      Section A.1: Shortcut Examples
    • 1-555
      Section A.2: Menu Activation Keyboard Shortcuts
    • 1-556
      Section A.3: Custom keyboard shortcuts
    • 1-557
      Credits
    • 1-558
      You may also like

    FAQ

    您可以透過手機、平板或是電腦登入 HiSKIO 平台,在【我的學習】>【我的書籍】頁面,選擇想看的電子書。

    Recommendations

    Reviews

    | Collecting

    Sales Plans