Right Shift And Left Shift Operator in SQL Server

In SQL Server, shift operators are not present as per knowledge.

If I have to achieve right shift and left shift, what will be the efficient way of doing it?

  • With mathematical expressions which will give me the same output as shift operator must have given.
  • OR

  • Will call CLR function to calculate the right shift and left shift because shift operators are available in C# which will give me the output what I am expecting.
  • Please suggest which one will be the more efficient way of doing it.

    链接地址: http://www.djcxy.com/p/72506.html

    上一篇: 枚举标志上的按位操作

    下一篇: SQL Server中的右移和左移操作符