如何在命令行上显示 SQLite3 表的表架构
另请参见如何在 Python 中获取 SQLite3 表的架构
你可以使用 .schema 命令通过 sqlite3 命令行工具显示 SQLite3 数据库文件中特定表的 SQL CREATE 语句:
show_schema.sh
sqlite3 [database file] ".schema (table name)"例如:
show_schema_example.sh
sqlite3 /usr/share/command-not-found/commands.db ".schema commands"Check out similar posts by category:
SQLite
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow