Skip to content

Instantly share code, notes, and snippets.

@relyky
Last active December 23, 2015 09:23
Show Gist options
  • Select an option

  • Save relyky/5936d765d85fbd12ee3b to your computer and use it in GitHub Desktop.

Select an option

Save relyky/5936d765d85fbd12ee3b to your computer and use it in GitHub Desktop.
T-SQL 換行字元, CHAR(13), CHAR(10), new line
--
-- new line :
-- \r CHAR(13)
-- \n CHAR(10)
--
DECLARE @MEMO NVARCHAR(MAX);
SET @MEMO = N'line 1 line 1 line 1 '
PRINT @MEMO
SET @MEMO = @MEMO + CHAR(13) + CHAR(10) + N'new line new line new line '
PRINT @MEMO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment