Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax error in sqlite trying to create a database

Tags:

sqlite

I am new to SQLite. I downloaded the latest version of SQLite (both shell and dll) and extract them to my D: drive. I execute the 'sqlite3.exe' file by double clicking on that.

When I try to create the database with the command sqlite3 test.db;, I get this error.

D:\Android Work\Sqlite\sqlite-shell-win32-x86-3070800>sqlite3.exe
SQLite version 3.7.8 2011-09-19 14:49:19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> sqlite3 test.db
...> ;
Error: near "sqlite3": syntax error
sqlite>

Please help me..

like image 914
Anshul Avatar asked Sep 23 '11 13:09

Anshul


1 Answers

I believe you have to type "sqlite3 test.db" from the command line prompt, not from inside the interactive SQLite interface.

See here:

 $ sqlite3 test.db
 SQLite version 3.0.8
 Enter ".help" for instructions
 sqlite> .quit
 $
like image 111
Otávio Décio Avatar answered Nov 02 '22 08:11

Otávio Décio