The ‘Computer programming’ Archives
Posted March 6, 2017 by



The ANSI_NULLS database SET option controls the behavior of Equal (=) and comparison operators (!=) in queries while dealing with NULL records. It is an ISO standard to decide for a query action to conclude how SQL Server should handle the comparison with NULLs.

Posted February 28, 2017 by



How often do we think of NULL values while concatenating NULLs with string values? String concentration with NULL values can give us some unexpected results if we are not aware of CONCAT_NULL_YIELDS_NULL database SET options. CONCAT_NULL_YIELDS_NULL options control whether concatenation results shall be treated as NULL or empty string values.

Posted January 30, 2017 by

Logical Query Processing in SQL Server


To learn the basics of SQL Server, you must have an understanding of how an SQL Server query engine executes an SQL query. T-SQL involves both logical and physical query processing. Physical query processing is about how a database engine processes a query. Logical query processing is a conceptual flow, an order of the clauses […]

Posted January 23, 2017 by

COALESCE and ISNULL Functions in SQL Server


SQL Server has introduced multiple ways to handle NULL values. The functions that are most used to handle NULLs are COALESCE and ISNULL in SQL Server. These functions are used to find Non-NULL values from a list of arguments. In this post, we will see the uses of the ISNULL and COALESCE functions and their […]

Posted January 5, 2017 by

A Beginner’s Guide to Sequence Objects in SQL Server


SQL Server has supported SEQUENCE objects since the inception of SQL Server 2012 and later editions. Oracle database has supported SEQUENCE objects from the beginning. You can read the archive post on Tech-Recipes using SEQUENCE in Oracle.

Posted November 27, 2016 by

Microsoft SQL Server: Estimated vs. Actual Execution Plans

SQL Server Estimated vs Actual Execution Plan

Let’s assume you are constructing a new house, and you have a contract with a builder. After thoughtful examination of the area, height, and materials needed, he estimates it will take 120 days to build a new home. After constructing the home, it actually took 200 days to built it. There is a difference between […]

Posted February 25, 2016 by

Find an Object’s Creation and Modification Dates in SQL Server


SQL Server is an all-in-one IDE for managing multiple user instances, SQL programming, and changing settings using graphical options. Often, we need to find out when a stored procedure/trigger was last modified, or we need to find the creation date of existing objects in SQL server. Finding the creation dates and the modification dates of […]

Posted February 18, 2016 by

Create a Folder Using CMD in Windows

Create a Folder Using CMD Using WINDOWS PC

Not many Windows users are familiar with CMD. The common misconception is that only programmers and computer geeks use CMD. Basically, CMD is a tool that you can use to communicate with your Windows computer. Though the user interface and other input methods are introduced, CMD is one tool that you cannot take for granted. […]

Posted February 11, 2016 by

SQL Server Three-Valued Logic and NOT IN clause with NULL values


While querying the production server to solve one critical issue, suddenly one query completely caught my attention. We had written a query which was created to find records which exist in Table A but do not exist in Table B, based on a certain column. The query was syntactically correct and ran without any errors, […]

Posted February 11, 2016 by

How to Find Nth/Second Highest and Lowest Salary in SQL


Based on what I have heard from friends and other online users and from my own personal experience, the most common job interview question for database programmers is “How do you find the highest salary in an employee table?” This question tests a candidate’s knowledge of ranking functions, subqueries, common table expression (CTE) and basic […]