select - mysql get number between two field containig 20digit long decimal number -
i have table 'serial' containing 2 field start_serial_no , end_serial_no have serials 20 digit longs(may vary).
i have 3 entries in table as
user enter serial number, have find in start , end pair belongs. using following returns 2 values output(1st , third) '899190150504778850' , third '899190150504778950'. instead should return third both.
select * `serial` '899190150504778850' between `start_serial_no` , `end_serial_no`
update: suggested in comment, seems longint
can store numbers a range of 0 18446744073709551615 unsigned numbers , varchar
can used achieve same number higher this.
--
your code correct. outputs want - in case, return third set of data.
i tried creating exact columns , inserting exact data table. running query gave me desired result.
try again same query. if encounter problem, please follow up.
Comments
Post a Comment