[英]How to select the column names of a table where column data contains '%' in the values?
How to select the column names of a table where column data contains '%' in the values? 如何选择表的列名,其中列数据的值中包含“%”?
Eg: In the table COMP there are two columns(Addr, Comp_Name) which has data containing '%' in its string. 例如:表COMP中有两列(Addr,Comp_Name),其字符串中包含“%”的数据。 So my query should return those column_names(Addr, Comp_Name) 所以我的查询应该返回那些column_names(Addr,Comp_Name)
I dont get you right but i thing this will help you 我不正确,但我认为这对您有帮助
You can use the escape identifier 您可以使用转义标识符
--Queries
-- for %
select * from test_a where col1 like '%\%%' escape '\';
--for _
select * from test_a where col1 like '%\_%' escape '\';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.