Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

SQL Server

Articles on SQL, TSQL and Management Studio. You can download Microsoft supplied sample database here: https://drive.google.com/file/d/0B8H2WLrOYbPxcy13RG9JNUpRRHM/edit?usp=sharing

SQL Insert Data Techniques

Data Cloning of a Table

We all know that to insert data into SQL server database we use the Insert statement. This article explains inserting data into the database table using various techniques available. First, we will start with normal insert statements. Then we will go ahead with inserting data from existing tables in the SQL Server Database.

Continue Reading →

Table Join Explored With Examples

Self Join SQL Example

“Table Joins” are useful for bringing data together from different tables based on their database relations. First, we will see how the join operates between tables. Then we will test the Order of Execution when Join and where condition both lies. Finally, we will move our exploration to Importance of the Join order. It is a good idea to know about database table relationships before reading this article.

Continue Reading →

Learn How to Use Order By Clause and Group By Clause

SQL Query with Aggregate, Group By, Order By and Having with Where conditions

1. Introduction to Grouping & Sorting In this article, we will explore group and sort the result of an SQL query. The Order By informs SQL engine to arrange the query output in ascending or descending order. To put it differently, the Order By will sort the output query result on a specific column or columns. We will also see how the TOP option behave with the Order By clause and then […]

Continue Reading →