Collections:
Binary Literals in SQL Server Transact-SQL
What are binary literals supported in SQL Server Transact-SQL?
✍: FYIcenter.com
Binary literals in Transact-SQL are sequences of bytes
written in hexadecimal digits with 0x prefixes.
Binary literals are used to provide values to binary variables or table columns like BINARY, VARBINARY, IMAGE, etc.
Here are some simple rules on how to write binary literals:
Here are some example on how to write exact numeric literals:
PRINT 0xff; PRINT 0x00ff; PRINT 0x00ff00; DECLARE @var BINARY(4); SET @var = 0x41424344; PRINT @var;
Â
2017-05-05, 5530👍, 0💬
Popular Posts:
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL...
What Is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is ...
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Serv...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...
How to change the data type of an existing column with "ALTER TABLE" statements in SQL Server? Somet...