SQL samples

APPLIES TO: yesSQL Server yesAzure SQL Database yesAzure SQL Data Warehouse yesParallel Data Warehouse

Locations of sample databases and code samples for Microsoft SQL products.

SQL samples repository

Code samples for SQL products are in the Microsoft SQL Server Samples GitHub repository. Each sample includes a README file that explains how to run and use the sample. The main README for the samples repository explains how to contribute.

The samples and templates are all licensed under the MIT license. See the license.txt file in the root.

Email questions to: sqlserversamples@microsoft.com.

WideWorldImporters sample database

WideWorldImporters (WWI) is a sample database that showcases database design using current features, tools and design techniques. WideWorldImporters downloads include an OLTP and an OLAP database which are built to run on SQL Server 2016 and later.

The database downloads and samples are in the SQL Server Samples GitHub repository.

AdventureWorks sample database

AdventureWorks databases are available in the SQL Server Samples GitHub repository. The following download locations include all the various versions of AdventureWorks.

Azure Samples and templates

There are a number of Microsoft Azure code samples and examples available on Github in .NET, Java, Python, Node.js, PHP and Ruby. Additionally, Azure Resource Manager allows you to provision your applications using a declarative template. In a single template, you can deploy multiple services along with their dependencies. You use the same template to repeatedly deploy your application during every stage of the application lifecycle.