I have a table with only one column with values like
row1 = a123 , row2 = 231 , row3 = 1233 , row4 = 123
how would I select all rows that contain "123" so that rows 1 , 3 , 4 would be a match?
selecting rows that contain pattern as a subset
Moderator: General Moderators
-
jaymoore_299
- Forum Contributor
- Posts: 128
- Joined: Wed May 11, 2005 6:40 pm
- Contact:
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
look up LIKE syntax:
Code: Select all
SELECT * FROM `table` WHERE `field` LIKE '%123%'