Collections:
Using Binary Strings in Arithmetical Operations in SQL Server
Can Binary Strings Be Used in Arithmetical Operations in SQL Server Transact-SQL?
✍: FYIcenter.com
Can binary strings be used in arithmetical operations? The answer is yes. But there are two simple rules you need to remember:
The tutorial exercise below shows you some good examples:
SELECT 0x66 + 44 GO 146 SELECT 0x66 - 44 GO 58 SELECT 0x66 * 44 GO 4488 SELECT 0x66 / 44 GO 2 SELECT 0x66 + 0x44 GO 0x6644 SELECT 0x66 - 0x44 GO Msg 8117, Level 16, State 1, Line 1 Operand data type varbinary is invalid for subtract operator. SELECT 0x66 * 0x44 GO Msg 8117, Level 16, State 1, Line 1 Operand data type varbinary is invalid for multiply operator. SELECT 0x66 / 0x44 GO Msg 8117, Level 16, State 1, Line 1 Operand data type varbinary is invalid for divide operator.
⇒ Converting Binary Strings into Integers in SQL Server
⇐ Concatenating Two Binary Strings in SQL Server
⇑ Character Strings and Binary Strings in SQL Server Transact-SQL
2017-02-28, 4171🔥, 0💬
Popular Posts:
How to continue to the next iteration of a WHILE loop in SQL Server Transact-SQL? How to use CONTINU...
How Run SQL*Plus Commands That Are Stored in a Local File in Oracle? If you have a group of commands...
How REAL and FLOAT Literal Values Are Rounded in SQL Server Transact-SQL? By definition, FLOAT(n) sh...
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...