質問 |
||
| QNo.3538135 | パターンマッチング | |
|---|---|---|
| 質問者:tttrrrr |
「'」をパターンマッチングしたい場合はどうすればいいのでしょうか? like '%'%'だとエラーになってしまいます。 |
|
困り度:
|
||
| 質問投稿日時: 07/11/22 10:38 |
||
回答 |
|
| ANo.1 | マニュアルで調べないのは、なぜでしょうかね。。。 http://www.postgresql.jp/document/pg800doc/html/sql-syntax.html#SQL... select * from tbl1 where c2 like '%''%' -- 方法1 order by c1; select * from tbl1 where c2 like '%\'%' -- 方法2 order by c1; select * from tbl1 where c2 like $$%'%$$ -- 方法3 order by c1; select * from tbl1 where c2 like $自分で決めたタグ$%'%$自分で決めたタグ$ -- 方法4 order by c1; |
|---|---|
| 回答者:chukenkenkou | |
| 種類:アドバイス どんな人:一般人 自信:参考意見 |
|
| 回答日時: 07/11/23 02:13 |
|
| |
| この回答へのお礼 | この回答にお礼をつける(質問者のみ) |