创建数据库的 SQLite 错误 [英] SQLite error for creating database

查看:63
本文介绍了创建数据库的 SQLite 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQLite version 3.8.0.2 2013-09-03 17:11:13
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> $sqlite3 DatabaseName.db;
Error: near "$sqlite3": syntax error
sqlite> DatabaseName.db;
Error: near "DatabaseName": syntax error
sqlite> sqlite3 DatabaseName.db;
Error: near "sqlite3": syntax error
sqlite>

我正在尝试在 SQLite 中创建一个数据库.我收到上述错误.请帮忙

I am trying to create a database in SQLite. I am getting the error as above. Please help

推荐答案

sqlite3 DatabaseName.db 是您将在命令行中使用的,而不是在您已经启动 shell 之后.在命令行运行它会在已经打开空数据库的情况下在 shell 中打开它.

sqlite3 DatabaseName.db is what you'd use at the command line, not once you've already started the shell. Running that at command line will open it in the shell with the empty database already open.

当你的提示是 sqlite> 时,你已经在 shell 中了.

When your prompt is sqlite>, you're already in the shell.

这里有一些文档:http://sqlite.org/sqlite.html

这篇关于创建数据库的 SQLite 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆