How do you add a string to a column in SQL Server?
UPDATE [myTable] SET [myText]=\' \'+[myText]
That doesn\'t work:
The
Stop using the TEXT
data type in SQL Server!
It's been deprecated since the 2005 version. Use VARCHAR(MAX)
instead, if you need more than 8000 characters.
The TEXT
data type doesn't support the normal string functions, while VARCHAR(MAX)
does - your statement would work just fine, if you'd be using just VARCHAR types.