Escape Character – MS SQL

What is the escape character in SQL? Assume you have to find the the names that contains single quote (‘), in this scenario single quote(‘) itself works as the escape character.  SELECT * FROM Person.Person WHERE LastName LIKE ‘%”%’ Consider the situation where you are tying to find records which… Continue Reading Escape Character – MS SQL

Union v/s Union All

Often many ask, what is the difference between union and union all? Union operator combines multiple resultsets into one resultset. Union also removes the duplicates and returns a sorted result set. Union All  operator combine multiple resultsets into one resultset, but it does not eliminate the duplicate rows.  Since the duplicate… Continue Reading Union v/s Union All