Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

sql - 如何列出使用ATTACH打开的SQLite数据库文件中的表?(How to list the tables in a SQLite database file that was opened with ATTACH?)

在SQLite 3命令行工具上使用ATTACH命令将其附加后,可以使用哪种SQL列出表以及这些表中的行在SQLite数据库文件中?

  ask by izb translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There are a few steps to see the tables in an SQLite database:

(有一些步骤可以查看SQLite数据库中的表:)

  1. List the tables in your database:

    (列出数据库中的表:)

     .tables 
  2. List how the table looks:

    (列出表格的外观:)

     .schema tablename 
  3. Print the entire table:

    (打印整个表:)

     SELECT * FROM tablename; 
  4. List all of the available SQLite prompt commands:

    (列出所有可用的SQLite提示命令:)

     .help 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...