SQL Server notes: Single quotes and @@TEXTSIZE
16 July 2008 | Posted by Jeffrey Barke | No comments
Working with Microsoft SQL Server for the first time in two years, so a few notes to self:
- Escape single quotes with two single quotes, not with
addslashes(). @@TEXTSIZEreturns the current value of theTEXTSIZEoption of theSETstatement, which specifies the maximum length, in bytes, of text or image data that aSELECTstatement returns.
An example of using TEXTSIZE:
SELECT @@TEXTSIZE
SET TEXTSIZE 2048
SELECT @@TEXTSIZE
Which results in:
------------------------
64512
------------------------
2048
From Journey to SQL Authority with Pinal Dive and MSDN.


Leave a Reply