如何SQLite中删除数据库? [英] how to drop database in sqlite?

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

问题描述

我使用SQLite的机器人。我想删除数据库。

I'm using SQLite in android. I want to drop the database.

例如: mysql-下降数据库数据库

我如何实现这个code的SQLite的?

How do I implement this code in SQLite?

推荐答案

创建或删除数据库的概念是没有意义的喜欢的SQLite嵌入式数据库引擎。它只有在客户端 - SEVER数据库系统的含义,如使用MySQL或Postgres的。

The concept of creating or dropping a database is not meaningful for an embedded database engine like SQLite. It only has meaning with a client-sever database system, such as used by MySQL or Postgres.

要创建一个新的数据库,只是做 sqlite_open()或命令行 sqlite3的databasefilename

To create a new database, just do sqlite_open() or from the command line sqlite3 databasefilename.

要删除数据库,删除该文件。

To drop a database, delete the file.

参考: 源码 - 不支持SQL

Reference: sqlite - Unsupported SQL

这篇关于如何SQLite中删除数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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