O'Reilly logo

Build iOS Database Apps with Swift and SQLite by Kevin Languedoc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Kevin Languedoc 2016

Kevin Languedoc, Build iOS Database Apps with Swift and SQLite, 10.1007/978-1-4842-2232-4_5

5. Inserting Records

Kevin Languedoc

(1)Montreal, Canada

The SQL Insert statement in SQLite has some interesting features, such as being able to replace an existing record, just like the Upsert statement in Oracle’s PL/SQL. The expression parameter can either be a literal or the return value from a function. We will explore these interesting features together.

This chapter will demonstrate how to insert data into a SQLite database. I will cover all the supported variations of the API, including:

  • The data-binding functions

  • Inserting records

  • Inserting or replacing records

  • The Insert or Rollback option

  • The Insert or Ignore option

  • The Insert ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required