There was a time when we all wished SQL Server supports compound operators just like any other programming languages. Wouldn’t it be nice to have a shorter syntax for assigning the result of an arithmetic operator? Well, SQL server 2008 introduced Compound operators that allow you to perform several arithmetic operations using an operand along with equal to (=) operand.
For example:
Declare @var1 int
Set @var1 = 150
Set @var1 += 100
Read more…
Categories: Operators, SQL Queries, SQL Server, SQL Server, T-SQL, T-SQL, T-SQL, Tips & Tricks Tags: Compound Operators, SQL Server, Transact SQL, tsql
November 14th, 2010
admin
Logical operators can be used in the queries to retrieve records based on one more conditions. In a select statement, the conditions specified by the logical operators are connected using a WHERE clause.
General syntax :
Select ColumnList
From TableName
Where ConditionalExpr1 {AND/OR} [NOT] ConditionalExpr2
There are 3 types of logical operators
Read more…
Categories: Operators, Operators, SQL Queries, SQL Server, T-SQL, T-SQL Tags: and, logical operators, not operator, operators, or, sql queries, SQL Server, T-SQL