如何快速了解 SQLite 中的表结构? [英] How can I get a fast overview over an table structure in SQLite?

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

问题描述

是否有类似显示来自 TABLENAME 的列"这样的命令?我只知道 .dump 命令,但在这种情况下这真的很愚蠢.它也会输出所有数据.

Is there some command like "show columns from TABLENAME"? I only know that .dump command, but that's really dumb in this case. It puts out all the data, too.

我需要一些东西来查看表格结构.

I need something to just see the table structure.

推荐答案

您需要使用 PRAGMA.

PRAGMA table_info(TABLENAME);

这篇关于如何快速了解 SQLite 中的表结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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