I need to display records from mysql database where a particular column has only alphabets.
eg,
Table Name: data
 column
 abcde
 12345
 xyz
 123
so the output should be abcde and xyz only. So far i tried using pattern match but no luck
here is what is use yet
   SELECT * FROM listing WHERE Zip LIKE '[^a-zA-Z]'
Try this code
SELECT * FROM listing WHERE Zip REGEXP  '^[A-z]+$'
                        Try regexp:
SELECT * FROM listing WHERE Zip REGEXP '^[a-zA-Z.]+$'
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With