I have a numbers column in my sql table and I want to pull all the numbers that start with 3 specific digits; how would I query this?
答案 0 :(得分:1)
Use the "LIKE" query:
123 is the prefix. I think you have to store the numbers as strings though, just try it out on your data set :-)
SELECT * from TableName Where ColumnName LIKE '123%'
See also this Q&A: In MySql, find strings with a given prefix