Friday, November 26, 2010

How to make a selection based on the ending value

An SQL command that selects the field’s values that end with a specific string.

SELECT * FROM `your_table_here` WHERE field_table REGEXP 'string_here$'; 

The symbol $ is telling MySQL to look at the ending of the value.

No comments:

Post a Comment