July, 2013
EXCEPT and INTERSECT (Transact-SQL)
They both return distinct values by comparing the results of two queries. EXCEPT returns any distinct values from the left query that are not also found on the right query. INTERSECT returns any distinct values that are returned by both the query on the left and right sides of the INTERSECT operand. The basic rules …
02
Jul
NTILE() in Transact-SQL
This function is used to distribute the rows in an ordered partition into a specified number of groups. The groups are numbered, starting at one. For each row, NTILE returns the number of the group to which the row belongs. Syntax NTILE (integer_expression) OVER ( [ <partition_by_clause> ] < order_by_clause > ) Arguments integer_expression Is …
01
Jul