nignix Posted March 1, 2011 Share Posted March 1, 2011 Hello, how can i make query to show all records that begin with number 555? I mean if i have in my table codes like: 55554567845 44744686486 55556875124 55558612214 33335854111 and i want to show only codes that starts *5555* Thanks for help. Quote Link to comment Share on other sites More sharing options...
samoht Posted March 1, 2011 Share Posted March 1, 2011 well are the records coming from the same field in a single table ?? if so then SELECT `yourfieldname` FROM yourtablename WHERE `yourfieldname` LIKE '555%' Quote Link to comment Share on other sites More sharing options...
nignix Posted March 1, 2011 Author Share Posted March 1, 2011 thanks, helpful Quote Link to comment Share on other sites More sharing options...
Maq Posted March 1, 2011 Share Posted March 1, 2011 Please be conscious of where you post (moved to the MySQL section). As samoht mentioned, use: http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.