How about using a substring with IN.
select * from tablename where substring(column,1,4) IN ('M510','M615','M515','M612')
More Related Contents:
- Error related to only_full_group_by when executing a query in MySql
- How to declare a variable in MySQL?
- Can you split/explode a field in a MySQL query?
- MySQL Cannot Add Foreign Key Constraint
- Grouping into interval of 5 minutes within a time range
- SQL counting all rows instead of counting individual rows
- MySQL – ERROR 1045 – Access denied
- Remote Connections Mysql Ubuntu
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘db’
- Difference between float and decimal data type
- Parse date in MySQL
- In MySQL, should I quote numbers or not?
- MySQL add days to a date
- How can I loop through all rows of a table? (MySQL)
- MySQL incorrect key file for tmp table when making multiple joins
- How to cast DATETIME as a DATE in mysql?
- “193: %1 is not a valid Win32 application” bug with a new Rails Application
- Does the order of conditions in a WHERE clause affect MySQL performance?
- Difference between these two joining table approaches?
- Get total number of rows when using LIMIT? [duplicate]
- MySQL query, MAX() + GROUP BY
- Convert JSON array in MySQL to rows
- Table is specified twice, both as a target for ‘UPDATE’ and as a separate source for data in mysql
- MySQL export into outfile : CSV escaping chars
- Simple Random Samples from a MySQL Sql database
- MySQL Select minimum/maximum among two (or more) given values
- MySQL: Many tables or many databases?
- Select only last value using group by at mysql
- MySQL “ERROR 1005 (HY000): Can’t create table ‘foo.#sql-12c_4’ (errno: 150)”
- Dump only the data with mysqldump without any table information?