Microsoft-sql-server.pdf









Module Title

JSON documents in tables and queries JSON documents through a JSON query language. It currently supports SQL Server and MariaDB as the underlying database.
JsonServer User Manual


Native JSON Datatype Support: Maturing SQL and NoSQL

Microsoft SQL Server [10] MySQL [12]
p liu


SQL Server Advanced Data Types: JSON XML

http://projanco.com/Library/SQL%20Server%20Advanced%20Data%20Types.%20JSON


Big Data Management System

20 oct. 2016 Growing influence on server side coding (Node.js) ... Example JSON document ... Full query capabilities using JSON Path XQuery and SQL.
cr json technical overview





TIBCO Flogo® Enterprise Activities Triggers

https://docs.tibco.com/pub/flogo/2.13.0/doc/pdf/TIB_flogo_2.13.0_activities_triggers_and_connections_guide.pdf?id=2


Querying JSON with Oracle Database 12c Release 2

Complex Queries on JSON content using SQL/JSON. 11. Relational access to JSON content In the example above the JSON represents a Purchase Order object.
sql json wp


Comparing Two SQL-Based Approaches for Querying JSON: SQL++

The SQL++ example queries that you are about to read are written in N1QL and have run successfully on Couchbase Server and (with minor syntactic variations) 
Comparing Two SQL Based Approaches WP


EEA Discodata

30 records See the Discodata JSON for more information. ... various WISE SOE database queries in the SQL query examples to get an idea on how the SQL works.





microsoft-sql-server.pdf

3 mars 2011 Chapter 49: JSON in Sql Server. 146. Syntax. 146. Parameters. 146. Remarks. 146. Examples. 146. Format Query Results as JSON with FOR JSON.
microsoft sql server


Microsoft SQL Server 2019 to Amazon Aurora MySQL Migration

SQL Server to Aurora MySQL Migration Playbook: Microsoft SQL Server Unused CTE query definition. ... For more information see JSON and XML (p. 165).
dms mpb sql server to aurora mysql


213468 microsoft-sql-server.pdf

Microsoft SQL Server

#sql-server

Table of Contents

About1

Chapter 1: Getting started with Microsoft SQL Server2

Remarks2

Versions2

Examples2

INSERT / SELECT / UPDATE / DELETE: the basics of Data Manipulation Language2

Joins4

Table Aliases5

Unions5

Table Variables6

PRINT7

SELECT all rows and columns from a table7

Select rows that match a condition8

UPDATE Specific Row8

UPDATE All Rows8

Comments in code8

Retrieve Basic Server Information9

Using Transactions to change data safely10

DELETE All Rows11

TRUNCATE TABLE11

Create new table and insert records from old table12

Getting Table Row Count12

Chapter 2: Advanced options14

Examples14

Enable and show advanced options14

Enable backup compression default14

Set default fill factor percent14

Set system recovery interval14

Enable cmd permission14

Set max server memory size14

Set number of checkpoint tasks15

Chapter 3: Aggregate Functions16

Introduction16

Syntax16

Examples16

SUM()16

AVG()16

MAX()17

MIN()17

COUNT()18

COUNT(Column_Name) with GROUP BY Column_Name18

Chapter 4: Alias Names in Sql Server20

Introduction20

Examples20

Using AS20

Using =20

Giving alias after Derived table name20

Without using AS21

Chapter 5: Analyzing a Query22

Examples22

Scan vs Seek22

Chapter 6: Backup and Restore Database23

Syntax23

Parameters23

Examples23

Basic Backup to disk with no options23

Basic Restore from disk with no options23

RESTORE Database with REPLACE23

Chapter 7: Basic DDL Operations in MS SQL Server25

Examples25

Getting started25

Create Database25

Create Table25

Create View26

Create Procedure26

Chapter 8: bcp (bulk copy program) Utility28

Introduction28

Examples28

Example to Import Data without a Format File(using Native Format )28

Chapter 9: BULK Import29

Examples29

BULK INSERT with options29

BULK INSERT29

Reading entire content of file using OPENROWSET(BULK)29 Read file using OPENROWSET(BULK) and format file29

Read json file using OPENROWSET(BULK)30

Chapter 10: CASE Statement31

Remarks31

Examples31

Simple CASE statement31

Searched CASE statement31

Chapter 11: CLUSTERED COLUMNSTORE32

Examples32

Table with CLUSTERED COLUMNSTORE index32

Adding clustered columnstore index on existing table32

Rebuild CLUSTERED COLUMNSTORE index32

Chapter 12: COALESCE34

Syntax34

Examples34

Using COALESCE to Build Comma-Delimited String34

Coalesce basic Example34

Getting the first not null from a list of column values35

Chapter 13: Common Language Runtime Integration36

Examples36

Enable CLR on database36

Adding .dll that contains Sql CLR modules36

Create CLR Function in SQL Server36

Create CLR User-defined type in SQL Server37

Create CLR procedure in SQL Server37

Chapter 14: Common Table Expressions38

Syntax38

Remarks38

Examples38

Employee Hierarchy38

Table Setup38

Common Table Expression38

Output:39

Find nth highest salary using CTE39

Delete duplicate rows using CTE40

Generate a table of dates using CTE41

Recursive CTE41

CTE with multiple AS statements42

Chapter 15: Computed Columns44

Examples44

A column is computed from an expression44

Simple example we normally use in log tables44

Chapter 16: Converting data types46

Examples46

TRY PARSE46

TRY CONVERT46

TRY CAST47

Cast47

Convert48

Chapter 17: CREATE VIEW49

Examples49

CREATE VIEW49

CREATE VIEW With Encryption49

CREATE VIEW With INNER JOIN49

CREATE Indexed VIEW50

Grouped VIEWs51

UNION-ed VIEWs51

Chapter 18: cross apply52

Examples52

Join table rows with dynamically generated rows from a cell52

Join table rows with JSON array stored in cell52

Filter rows by array values52

Chapter 19: Cursors54

Syntax54

Microsoft SQL Server

#sql-server

Table of Contents

About1

Chapter 1: Getting started with Microsoft SQL Server2

Remarks2

Versions2

Examples2

INSERT / SELECT / UPDATE / DELETE: the basics of Data Manipulation Language2

Joins4

Table Aliases5

Unions5

Table Variables6

PRINT7

SELECT all rows and columns from a table7

Select rows that match a condition8

UPDATE Specific Row8

UPDATE All Rows8

Comments in code8

Retrieve Basic Server Information9

Using Transactions to change data safely10

DELETE All Rows11

TRUNCATE TABLE11

Create new table and insert records from old table12

Getting Table Row Count12

Chapter 2: Advanced options14

Examples14

Enable and show advanced options14

Enable backup compression default14

Set default fill factor percent14

Set system recovery interval14

Enable cmd permission14

Set max server memory size14

Set number of checkpoint tasks15

Chapter 3: Aggregate Functions16

Introduction16

Syntax16

Examples16

SUM()16

AVG()16

MAX()17

MIN()17

COUNT()18

COUNT(Column_Name) with GROUP BY Column_Name18

Chapter 4: Alias Names in Sql Server20

Introduction20

Examples20

Using AS20

Using =20

Giving alias after Derived table name20

Without using AS21

Chapter 5: Analyzing a Query22

Examples22

Scan vs Seek22

Chapter 6: Backup and Restore Database23

Syntax23

Parameters23

Examples23

Basic Backup to disk with no options23

Basic Restore from disk with no options23

RESTORE Database with REPLACE23

Chapter 7: Basic DDL Operations in MS SQL Server25

Examples25

Getting started25

Create Database25

Create Table25

Create View26

Create Procedure26

Chapter 8: bcp (bulk copy program) Utility28

Introduction28

Examples28

Example to Import Data without a Format File(using Native Format )28

Chapter 9: BULK Import29

Examples29

BULK INSERT with options29

BULK INSERT29

Reading entire content of file using OPENROWSET(BULK)29 Read file using OPENROWSET(BULK) and format file29

Read json file using OPENROWSET(BULK)30

Chapter 10: CASE Statement31

Remarks31

Examples31

Simple CASE statement31

Searched CASE statement31

Chapter 11: CLUSTERED COLUMNSTORE32

Examples32

Table with CLUSTERED COLUMNSTORE index32

Adding clustered columnstore index on existing table32

Rebuild CLUSTERED COLUMNSTORE index32

Chapter 12: COALESCE34

Syntax34

Examples34

Using COALESCE to Build Comma-Delimited String34

Coalesce basic Example34

Getting the first not null from a list of column values35

Chapter 13: Common Language Runtime Integration36

Examples36

Enable CLR on database36

Adding .dll that contains Sql CLR modules36

Create CLR Function in SQL Server36

Create CLR User-defined type in SQL Server37

Create CLR procedure in SQL Server37

Chapter 14: Common Table Expressions38

Syntax38

Remarks38

Examples38

Employee Hierarchy38

Table Setup38

Common Table Expression38

Output:39

Find nth highest salary using CTE39

Delete duplicate rows using CTE40

Generate a table of dates using CTE41

Recursive CTE41

CTE with multiple AS statements42

Chapter 15: Computed Columns44

Examples44

A column is computed from an expression44

Simple example we normally use in log tables44

Chapter 16: Converting data types46

Examples46

TRY PARSE46

TRY CONVERT46

TRY CAST47

Cast47

Convert48

Chapter 17: CREATE VIEW49

Examples49

CREATE VIEW49

CREATE VIEW With Encryption49

CREATE VIEW With INNER JOIN49

CREATE Indexed VIEW50

Grouped VIEWs51

UNION-ed VIEWs51

Chapter 18: cross apply52

Examples52

Join table rows with dynamically generated rows from a cell52

Join table rows with JSON array stored in cell52

Filter rows by array values52

Chapter 19: Cursors54

Syntax54