sql - How To Get The Number Interval Between Rows via MySQL -


We have a table with two columns- ID and value. The ID is an index of the table row, and the value in the database includes string and hexadecimal storage in the form of a string and a key (a number). Take 00001810010 as an example, fixed string is 0000181 and part key of the second is - 0010.

Table

  ID value 0 00001810000 1 00001810010 2 00001810500 3 00001810900 4 0000181090a   

From the above table, I get the number interval between the rows I want to achieve, the result for the above version is [1, 9], [11, 4FF], [501, 8FF], [901, 909]

I have all the records I can read in the memory and enable them to handle through C ++, but is it possible to implement it only through the details of MySQL? how?

You need to have some mathematical operations between rows. This link can help you:

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -