You can use Regular Expression too… it would be like:
SELECT * FROM myTable WHERE col1 REGEXP '^[0-9]+$';
Reference:
http://dev.mysql.com/doc/refman/5.1/en/regexp.html
More Related Contents:
- SELECTING with multiple WHERE conditions on same column
- WHERE vs HAVING
- MySQL Select last 7 days
- how to delete data from table A besides the customer service and director data in table B?
- Get records with max value for each group of grouped SQL results
- How to populate a table with a range of dates?
- MYSQL OR vs IN performance
- ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Using union and order by clause in mysql
- Using an Alias in SQL Calculations
- Can MySQL replace multiple characters?
- OUTPUT Clause in MySQL
- Search all columns of a table using a single where condition with single keyword in mysql
- Using ORDER BY and GROUP BY together
- Sorting by date & time in descending order?
- Case statement in MySQL
- MySQL Pivot Table Column Data as Rows
- updating columns with a sequence number mysql
- MySQL, Concatenate two columns
- Select a column with a keyword name
- MySQL: Inner join vs Where [duplicate]
- Selecting from two tables with inner join and limit [duplicate]
- Use Composite Primary Key as Foreign Key
- Why the order of evaluation for expressions involving user variables is undefined?
- How to select data where a field has a min value in MySQL?
- How to SELECT by MAX(date)?
- get a recursive parent list
- How do you force mysql LIKE to be case sensitive? [duplicate]
- In what order are MySQL JOINs evaluated?