之前写了篇文章《Oracle转义字符》,说到了Oracle中单引号“’”的转义字符是单引号“’”,那么其他的特殊字符的转义字符又是什么呢,如模糊查询的占位符“%”,“_”等。
经过测试,在Oracle中不能再使用单引号“’”来转义“%”,“_”了,而是用反斜杠“”,不仅如此,还要声明反斜杠“”是转义字符。
假设表为tb,字段为col,要在col中查询包含“%”或“_”字符的字段,sql如下:
– Oracle
select * from tb where col like
DataView RowFilter Syntax [C#] This example describes syntax of DataView.RowFil ter expression. It shows how to correctly build expression string (without „SQL injection“) using methods to escape values. Column names If a column name contains any of