0
votes

I'm just getting started with SQLite.

My tutorial specifies creating a test file (http://sql.learncodethehardway.org/book/ex0.html).

I've done sqlite> test.db I don't know how to check that this has created the file.

I also tried another tutorial (https://www.youtube.com/watch?feature=player_detailpage&v=QjICgmk31js#t=430) and got a syntax error on the second line:

sqlite> test.db ...> create table employees (id integer primary key, name text);

"Error: near "test"; syntax error"

Very frustrating, thank you for any help on this stumbling block.

1
That page tells you to open a terminal and to run the sqlite3 tool from there. - CL.

1 Answers

1
votes

To test SQLite:

  • Create a file with name: "my_database_name.db"
  • Download command Line Shell for SQLite from here: https://www.sqlite.org/download.html
  • Run the command Line Shell and type: .open path_to_file/my_database_name.db and the you will connect to the database.
  • You can now execute SQLite commands such as create table etc.