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

    FAQ

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

    Recommendations

    Reviews

    | Collecting

    Sales Plans