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, 3134👍, 0💬
Popular Posts:
How To Verify Your PHP Installation in MySQL? PHP provides two execution interfaces: Command Line In...
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Serve...
How To Create a Simple Stored Procedure in SQL Server Transact-SQL? If you want to create a simple s...
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs...
How To Convert Numeric Expression Data Types using the CAST() Function in SQL Server Transact-SQL? I...