This question is for SQL.
Which construct only lasts for the duration of the session/connection? (Select all that apply)
A. Global temp tables
B. Local temp tables
C. Table variables
D. CTEs
Local temp table
Table variables
CTEs
The local temp table is a temporary table that only lasts for an SQL session or connection.
Common Table Expression(CTE) is a temporary named result using the command statements and executes within a session or connection.
Table variable is a special type of variable which store data temporarily and act as a local variable. It works in a particular session or connection.
While the Global temporary variable visible is all sessions or connections and can be used in other sessions as well.
Get Answers For Free
Most questions answered within 1 hours.