Found out that _
is a special character. Have to escape with backslashes.
SELECT id FROM images WHERE img_path LIKE 'abc\_%'
which returns 2 rows as expected
More Related Contents:
- Which DB technology is sued to solve the following search issue? [closed]
- Delete the entire content of all table in a Database [closed]
- MySQL pivot row into dynamic number of columns
- Delete all Duplicate Rows except for One in MySQL? [duplicate]
- What’s faster, SELECT DISTINCT or GROUP BY in MySQL?
- MySQL – Operand should contain 1 column(s)
- How to get the difference in years from two different dates?
- Restore table structure from frm and ibd files
- mysql pivot/crosstab query
- MySQL: Split comma separated list into multiple rows
- Most efficient way to get table row count
- UNION query with codeigniter’s active record pattern
- Mysql Convert Column to row (Pivot table )
- Merge two tables in one SQL query and make the date values unique
- Remove Primary Key in MySQL
- Get most recent row for given ID
- Is merge statement available in MySQL
- Mysql covering vs composite vs column index
- MYSQL syntax not evaluating not equal to in presence of NULL
- Mysql insert random datetime in a given datetime range
- MySql – Way to update portion of a string?
- MYSQL select DISTINCT values in two columns
- What are practical differences between `REPLACE` and `INSERT … ON DUPLICATE KEY UPDATE` in MySQL?
- MySQL INNER JOIN select only one row from second table
- Storing IPv6 Addresses in MySQL
- Insert/ Update random date in MySQL
- Replace null with 0 in MySQL
- Get total hours worked in a day mysql
- MySQL: Computed Column
- mySQL query to search all tables within a database for a string?