Skip to content
Home » SQL Advance Tutorial

SQL Advance Tutorial

SQL SERVER IF..ELSE

SQL Server IF..ELSE block is a control-of-flow that allows you to execute or skip a statement block based on a specified condition.  

SYNTAX

IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]  

SYNTAX

IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]

Loading

SQL Server STRING_AGG Function

SQL Server STRING_AGG() Function is string function which concatenates values for any given string expressions and separate them a specified separator.

It does not add the separator at the end of the result string.

String expression values are implicitly converted to string types and then concatenated.

Loading

SQL SERVER @@IDENTITY

SQL Server @@IDENTITY function is a system function that is used to get the last IDENTITY value generated for any table with an identity column under the current session, regardless of the scope of the T-SQL statement that generated the value.

Loading