# How does sql\_last\_value parameter work in jdbc input plugin?

**URL:** https://discuss.elastic.co/t/how-does-sql-last-value-parameter-work-in-jdbc-input-plugin/101624
**Category:** Logstash
**Created:** [September 25, 2017, 3:43am UTC](https://discuss.elastic.co/t/how-does-sql-last-value-parameter-work-in-jdbc-input-plugin/101624 "2017-09-25T03:43:13Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 26, 2017, 5:11am UTC](https://discuss.elastic.co/t/how-does-sql-last-value-parameter-work-in-jdbc-input-plugin/101624/6 "2017-09-26T05:11:58Z")

</div>

> statement =\> "SELECT \* from table\_name WHERE id \> :sql\_last\_value"

Where's the ORDER BY clause?

---

_[View the full topic](https://discuss.elastic.co/t/how-does-sql-last-value-parameter-work-in-jdbc-input-plugin/101624)._
