1
0

39_hellosqlite.c 317 B

123456789101112131415
  1. #include <sqlite3.h>
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. sqlite3 *db;
  6. sqlite3_stmt *res;
  7. sqlite3_open(":memory:", &db);
  8. sqlite3_prepare_v2(db, "SELECT \"Hello, SQLite3!\"", -1, &res, NULL);
  9. sqlite3_step(res);
  10. printf("%s\n", sqlite3_column_text(res, 0));
  11. sqlite3_finalize(res);
  12. sqlite3_close(db);
  13. return 0;
  14. }