SQL BETWEEN Operator – Defining Range in a Condition with Examples

This operator is used in SQL whenever it is needed to prove if certain value belongs to some range. This operator is used together with “AND” command which defines given range. Operator can be used in most of the clauses but is most common in WHERE for defining limiting requirement. SQL BETWEEN Operator Syntax SELECT… Read More »

SQL Handling Transaction COMMIT ROLLBACK – Prevent Troubles

What we call a transaction in SQL is logical set or sequence of operations which belong to this transaction. SQL Transactions can be used if we perform some changes in a databases. Advantage of transactions managing is that performed changes are reversible and we always need to use command COMMIT for confirmation or use ROLLBACK… Read More »

SQL CTE (Common Table Expressions) With Examples – More Organized Queries and Procedures

SQL CTE, or Common Table Expression, is essentially a temporary result set represented in the form of an expression. Once declared using the WITH clause, it can be referenced in SELECT, INSERT, DELETE, or UPDATE scripts. SQL CTE (common table expression) Syntax WITH Alias_Query AS ( SELECT Column1, Column2 FROM dbo.Table ) SELECT * FROM Alias_Query; We… Read More »