我正在尝试在我的Windows 7 64位计算机上创建一个sqlite3数据库。我从http://www.sqlite.org/download.html下载了sqlite-shell-win32-x86-3071502。从已安装的文件夹运行sqlite3.exe后,我运行了以下命令:
sqlite3 mytest.db;
但我得到“错误:接近”sqlite3“:语法错误”。
非常感谢任何帮助。
由于
答案 0 :(得分:4)
我猜您在sqlite shell中输入命令(见下文)
sqlite> sqlite3 mytest.db;
Error: near "sqlite3": syntax error
您收到错误,因为它不是有效的sqlite命令。 如果要创建名为mytest.db的数据库,请尝试在Windows命令提示符下输入该命令,然后您将进入sqlite shell环境。要查找所有支持的命令,请在sqlite shell中输入.help。
D:\sqlite> sqlite3 mytest.db
SQLite version 3.6.23
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .help