Reputation: 464
Basically, I have a database with over 1 million records, where duplicated values are deemed as duplicates and have a number at the end of the record.
Is there an SQL statement that selects value if the last character is a number?
select RIGHT('abcdeffff',1)
I need a mySQL version, that gets the last character as so but with if statement checking if it's an integer?
Upvotes: 0
Views: 60
Reputation: 294
Try using REGEXP.
Where RIGHT('abcdeffff',1) REGEXP ('[0-9]')
Upvotes: 2