22,210
社区成员
发帖
与我相关
我的任务
分享
-->*******************************************************
-->Microsoft SQL Server Management Studio Complete 2008***
-->AUTHOR : Mr wang **********
-->CREATE TIME : 2010-11-22 14:42:12 **************
-->*******************************************************
--> 测试数据:[TB]
if object_id('[TB]') is not null
drop table [TB]
GO
---->建表
create table [TB]([sfrq] varchar(4))
insert [TB]
select '\r\n'
GO
--> 查询结果
SELECT *,replace([sfrq],'\r\n','\\r\\n') as y
FROM [TB]
--> 删除表格
DROP TABLE [TB]