如何在一组字符串上添加反引号 [英] How to add backticks on a set of string
本文介绍了如何在一组字符串上添加反引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个看起来像这样的字符串.
I have a string that looks like this.
111,222,333,444,555
如何在每个数据上添加回勾?我会用它来插入列.
how can i add back ticks on each data? I will use it for insert columns.
我试过这个
<代码>选择CONCAT('''', REPLACE('111,222,333,444,555', ',', ''','''), '''') 作为第二FROM 双;
但不支持反引号.
这就是我想要做的.我在存储过程中传递一组字符串,并在我尝试在表中插入数据时将其用作我的列
Heres what Im trying to do. I pass a set of string on a stored procedure and the use that as my column when i am trying to insert a data in a table
推荐答案
试试这个:
SELECT
CONCAT('`', REPLACE('111,222,333,444,555', ',', '`,`'), '`') AS second
FROM dual;
输出:
second
`111`,`222`,`333`,`444`,`555`
这篇关于如何在一组字符串上添加反引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文