Skip to main content

All Questions

Tagged with
0 votes
0 answers
159 views

MySQL select rows where numeric portions of varchar match numbers

I am trying to have a row of data containing 'tn450' to result when searching by '450.' I've been researching on here but can't seem to combine the REGEXP and LIKE commands SELECT * FROM `...
ihateartists's user avatar
1 vote
5 answers
7k views

MySQL: Update a column if value is numeric only [duplicate]

Is there a way to update a column in mysql if value is number only? ie. UPDATE myTable SET ColumnA =NewValue WHERE ColumnA isnumeric Column A is varchar(25) and Column A value may be text or 1 or 2 ...
Khaldonno's user avatar
0 votes
3 answers
785 views

regular expression search a number from string

this question maybe very simple for you. i'm using mysql regexp statment. myQuery is select * from contents where categories regexp '{myPattern}'; categories field area 54,25,99,4,2... etc string. ...
maverabil's user avatar
  • 188
16 votes
2 answers
39k views

MySql Not Like Regexp?

I'm trying to find rows where the first character is not a digit. I have this: SELECT DISTINCT(action) FROM actions WHERE qkey = 140 AND action NOT REGEXP '^[:digit:]$'; But, I'm not sure how to ...
TwixxyKit's user avatar
  • 10.7k