O'Reilly logo

Writing Stored Procedures for Microsoft SQL Server by Matthew Shepker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Operators

Operators are symbols that indicate that a specific action is to take place with one or more expressions. A great number of operators are available in SQL Server. Operators are divided into several categories, based on the operations they perform:

  • Assignment

  • Arithmetic

  • Comparison

  • Logical

  • String concatenation

  • Bitwise

  • Unary

Assignment Operator

This operator—the equal sign (=)—is one of the most ubiquitous operators that you will run into. The assignment operator assigns a value to a variable or a column. An example of this is as follows:

SELECT @intValue = 1

Arithmetic Operators

Arithmetic operators are the same simple operations that you learned in grade school to add, subtract, multiple and divide numbers. These operators are used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required