0

该表有一个包含双管道的字段"||"

我不确定如何让查询识别管道。我猜他们没有被解释为字符串文字。

WHERE field LIKE '||%value%||'

4

1 回答 1

1

The pipe character has no special meaning, neither in a string literal, nor in a like pattern.

Are you really looking for a value that starts and ends with two pipe characters, and contains value somehere between them? For examle ||asdfvalueqerty||.

If you are looking for a value that contains ||value||, you would use the pattern '%||value||%' instead.

于 2012-12-10T15:43:26.773 回答