Category Archives: SQL

Basic SQL Cheat Sheet

By | August 27, 2018

SQL (Structured Query Language) was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce after learning about the relational model from Ted Codd in the early 1970s. This version, initially called SEQUEL(Structured English Query Language), was designed to manipulate and retrieve data stored in IBM’s original quasi-relational database management system, System R, which a group at IBM San Jose Research Laboratory had developed during… Read More »

Creating Indexes with Included Columns

By | October 7, 2017

A nonclustered index can be extended by including nonkey columns in addition to the index key columns. The nonkey columns are stored at the leaf level of the index b-tree. Indexes that include nonkey columns provide the greatest benefit when they cover the query. This means the indexes include all columns referenced by the query. Adding… Read More »

Category: SQL

How to Copy Azure SQL Database to Local SQL Server

By | September 5, 2017

Azure SQL Database is a relational database-as-a service using the Microsoft SQL Server Engine. SQL Database is a high-performance, reliable, and secure database you can use to build data-driven applications and websites in the programming language of your choice, without needing to manage infrastructure. Some times you may want to create a copy of azure… Read More »

Concatenate All Column Values in Sql

By | August 25, 2017

If you work with the SQL you might have came across this question sometime. How to Concatenate all column values from different rows returned from a SQL query into one value? This is an example: a query returns: FOO —— RES1 RES2 RES3 now we want to have a result like the following one: FOOCONCAT —– RES1RES2RES3

Category: SQL

Temporal Tables in Azure SQL Database

By | August 25, 2017

Temporal Tables allow you to track the full history of data changes directly in Azure SQL Database, without the need for custom coding. With Temporal Tables you can see your data as of any point in time in the past and use declarative cleanup policy to control retention for the historical data. When to use… Read More »