? represents a placeholder that you will associate with a value (for example, to set a text value, use sqlite3_bind_text after the sqlite3_prepare_v2 statement, but before executing it with sqlite3_step .
See sqlite3_bind documentation.
This is a very important construct to know and use, because you never want to build your SQL with stringWithFormat . Using sqlite3_bind , you get rid of the need to write code that avoids any quotes that you might have at your input, for example. you are trying to insert the values of Joe Bar and Grill (where the apostrophe will corrupt your SQL if you use single quotes) or Dwayne "The Rock" Johnson (where the quotes will corrupt your SQL if you use double quotes). It also protects you from SQL injection attacks. Definitely use sqlite3_bind instead of manually creating SQL statements.
source share