更改 SQLite 默认设置 [英] Change SQLite default settings

查看:58
本文介绍了更改 SQLite 默认设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们知道什么时候输入 .mode column 让我看到像 column 这样的表格而 .headers on ,我们可以看到表格的头部.但是我想知道是否有任何方法可以使这两个默认设置?

we know when type .mode column let me see tables like column And .headers on , we can see the header of tables. But I want to know if there is any way make the two default settings?

对sqlite的源代码做一些修改??或者是否有这些设置的配置文件?

Do some modify for the source code of sqlite?? OR is there a config file for these settings?

推荐答案

Put:

.headers on
.mode column

在运行 sqlite 的用户的主目录中名为 .sqliterc 的文件中.

In a file called .sqliterc in the home directory of the user running sqlite.

(P.S. 我在 man sqlite3 中发现了这一点.)

(P.S. I found that in man sqlite3.)

这篇关于更改 SQLite 默认设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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