Sql select two digits values only -
i'm trying select values sql table (phpmyadmin) contains 2 digits.
so:
idnumber = '12' //should selected
idnumber = '34' //should selected
idnumber = '123' //should not selected
idnumber = '456' //should not selected
this have far, returns nothing / zero
select * `tablename` idnumber '[0-9][0-9]'
any ideas?
try this
sql-server:
select * `tablename` len(idnumber) = 2
mysql:
select * `tablename` length(idnumber) = 2
Comments
Post a Comment