SQLid value1 100002 200003 500004 750005 120000
SQLSELECT t2.value-t1.value FROM test t1 JOIN test t2 ON(t2.id = t1.id+1);
SQLSELECT t2.value-t1.value FROM test t1 JOIN test t2 ON(t2.id = (SELECT id FROM test WHERE id > t1.id ORDER BY id LIMIT 1 ) )