本文介绍了在stuff函数中添加换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在SQL中,我使用了Stuff函数来获取数据库中的值,如图所示,
20.00,50.00,30.00
但在显示时我想显示不同行中的值,如:
20.00
50.00
30.00。
我知道我应该在前端格式化它但有没有任何方法SQL方面这是紧急要求,我不想为此改变我的MVC代码。
我试过,CHAR(10),CHAR( 13),CHAR(10)+ CHAR(13),CHAR(13)+ CHAR(10)。
这些都不起作用。
Hi,
In SQL, I have used Stuff function to get the values from the database as shown,
20.00,50.00,30.00
But while showing I want to show the values in different rows like:
20.00
50.00
30.00.
I know I should format it on the front end but is there any method on SQL side to do this as it's urgent requirement and I don't want to change my MVC code for this.
I have tried, CHAR(10), CHAR(13), CHAR(10)+CHAR(13), CHAR(13)+CHAR(10).
None of these things work.
推荐答案
这篇关于在stuff函数中添加换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!