Search code examples
sql-servert-sqlsql-server-2000

What does the pipe/veritcal bar character mean in TSQL?


Google-fu is failing me on this one. Can anyone briefly explain what the following statement would do?:

UPDATE
    message WITH (ROWLOCK)
SET
    message = message | 2

I found this in a trigger, and I am unable to find docs explaining what the | character does in a statement like this.


Solution

  • That is a bitwise OR

    http://msdn.microsoft.com/en-us/library/ms176122.aspx