通过Management Studio 2005粘贴到SQL Server表中并保留行结尾

jam*_*ing 1 sql-server ssms line-endings paste sql-server-express

我不能让这个工作.我在SQL Server Management Studio 2005中打开了一个SQL Server Express表.当我尝试将多行文本片段粘贴到NTEXT字段时,它会被截断为仅包含第一行.

在Access中,这些东西有效,我该怎么办?

And*_*mar 5

将其重写为UPDATE或INSERT INTO语句.字符串文字可以跨越多行:

declare @t table (d varchar(10))
insert into @t values ('a
b
c')
Run Code Online (Sandbox Code Playgroud)