Skip to content

The WHERE Clause

Siim Kinks edited this page Mar 21, 2017 · 3 revisions

The WHERE clause is used to specify a condition while fetching the data from one table or multiple tables.

SQL SqliteMagic
SELECT *
  FROM BOOK
 WHERE BOOK.TITLE LIKE '%Foo%' 
       AND BOOK.PAGES > 200;
import static com.siimkinks.sqlitemagic.BookTable.BOOK;

List<Book> books = Select
        .from(BOOK)
        .where(BOOK.TITLE.like("%Foo%")
                .and(BOOK.PAGES.greaterThan(200)))
        .execute();

See Next

Clone this wiki locally