Using Temp Table

By using SELECT … INTO, you don’t have to define the columns of the temporary table. The temporary table columns will be based on the SELECT columns.

Rounding in SQL

16.10 16.100 16.1000 16.110 Example: Source:

Outer / Cross Apply

SQL Server 2005 introduced the APPLY operator. SQL Server APPLY operator has two variants; CROSS APPLY and OUTER APPLY The CROSS APPLY operator returns only those rows from the left table expression (in its final output) if it matches with the right table expression. In other words, the right table expression returns rows for the... » read more

Table Variables

Microsoft introduced table variables with SQL Server 2000 as an alternative to using temporary tables. In many cases a table variable can outperform a solution using a temporary table, although we will need to review the strengths and weaknesses. Scope Unlike the majority of the other data types in SQL Server, you cannot use a... » read more


Used to convert rows to columns. Example 1: Example 2: Sources: