Skip to content

Commit

Permalink
add default escape char
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxingao committed Apr 26, 2020
1 parent 488684b commit c5cbabc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/sql-ref-syntax-qry-select-like.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ A LIKE predicate is used to search for a specific pattern.
<dl>
<dt><code><em>esc_char</em></code></dt>
<dd>
Specifies the escape character.
Specifies the escape character. The default escape character is <code>\</code>.
</dd>
</dl>
<dl>
Expand Down Expand Up @@ -99,6 +99,13 @@ SELECT * FROM person WHERE name RLIKE '[MD]';
|200|Mary|null|
+---+----+----+

SELECT * FROM person WHERE name LIKE '%\_%';
+---+------+---+
| id| name|age|
+---+------+---+
|500|Evan_W| 16|
+---+------+---+

SELECT * FROM person WHERE name LIKE '%$_%' ESCAPE '$';
+---+------+---+
| id| name|age|
Expand Down

0 comments on commit c5cbabc

Please sign in to comment.