This article provides an overview of the LEFT JOIN
in SQL, as well as some basic examples.
Tag: what is
SQL Inner Join
This article provides an overview of the INNER JOIN
in SQL, as well as some basic examples.
SQL Right Join
This article provides an overview of the RIGHT JOIN
in SQL, as well as some basic examples.
SQL Alias Explained
The SQL alias is a nice little feature of SQL that allows you to write more concise code and create column names when no column name exists.
There are two SQL alias types; column aliases, and table aliases. In this article, I provide an overview of both.
Continue readingSQL Server ROWCOUNT_BIG()
In SQL Server, you can use the ROWCOUNT_BIG()
system function to return the number of rows affected by the last T-SQL statement.
It works exactly the same as @@ROWCOUNT
, except that ROWCOUNT_BIG()
returns its result as a bigint.
SQL Server SHOWPLAN_ALL
In SQL Server, you can use the SET SHOWPLAN_ALL
statement to return detailed information about how a T-SQL statement is executed, as well as estimates of the resource requirements for the statements.
SQL Server SHOWPLAN_TEXT
In SQL Server, you can use the SET SHOWPLAN_TEXT
statement to return detailed information about how a T-SQL statement is executed.
SQL Server CASE Expression
In SQL Server, the T-SQL CASE
expression is a scalar expression that returns a value based on conditional logic. It evaluates a list of conditions and returns a value, based on the outcome of those conditions..
In some ways, the SQL Server CASE
expression is similar to IF...ELSE
. However, CASE
allows you to check for multiple conditions, whereas IF...ELSE
doesn’t.
What is STATISTICS TIME in SQL Server?
In SQL Server, you can use the SET STATISTICS TIME
statement to display the time it takes to execute a T-SQL statement.
More specifically, it returns the number of milliseconds required to parse, compile, and execute each statement.
When SET STATISTICS TIME
is ON
, the time statistics for a statement are displayed. When OFF
, the time statistics are not displayed.
The setting of SET STATISTICS TIME
is set at execute or run time and not at parse time.
What is STATISTICS PROFILE in SQL Server?
In SQL Server, you can use the SET STATISTICS PROFILE
statement to display the profile information for a T-SQL statement.
STATISTICS PROFILE
works for ad hoc queries, views, and stored procedures.
When STATISTICS PROFILE
is set to ON
, each executed query returns its regular result set, followed by an additional result set that shows a profile of the query execution.