Collections:
Single-byte String Literals in SQL Server Transact-SQL
What are single-byte string literals supported in SQL Server Transact-SQL?
✍: FYIcenter.com
Single-byte string literals in Transact-SQL are sequences of characters enclosed
in single quotes.
String literals are used to provide values to string variables or table columns like CHAR(40), VARCHAR(40), etc.
String literals are also used in string operations in expressions and string arguments in functions.
Here are some simple rules on how to write string literals:
Here are some example on how to write string literals:
PRINT 'FYIcenter.com'; PRINT 'Murphy''s law'; PRINT '2017-11-31'; PRINT 'Hello '+'Joe!'; DECLARE @var CHAR(16); SET @var = 'Hello World!'; PRINT @var;
⇒ Collation - Character Code Page in SQL Server Transact-SQL
⇐ Types of Data Literals in SQL Server Transact-SQL
2017-05-20, 3472🔥, 0💬
Popular Posts:
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...
How to print value on console in SQL Server Transact-SQL? How to use the PRINT statements? In Transa...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
Is PL/SQL Language Case Sensitive in Oracle? PL/SQL language is not case sensitive: Reserved words a...