在sql中使用LIMIT获取最后的结果

I have created a table that is similar to the one below, my goal is to LIMIT the result to 10 AND THEN return the id of the LAST result which is 10. I've tried doing, the query below but it keeps returning my the value of 15, instead of 10.

SELECT id FROM this_table WHERE value=value ORDER BY id DESC LIMIT 10.  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
select max(id) from
(
    SELECT id 
    FROM this_table 
    WHERE value = 'some_value'
    ORDER BY id
    LIMIT 10
) x

LIMIT can take two parameters.

Try

SELECT id FROM this_table WHERE value=value 
ORDER BY id LIMIT 9,1

Read all about it.

EDIT: Oh, and loose the DESC part. It seems you don't really need it.