column details in sqlite3

后端 未结 2 885
遇见更好的自我
遇见更好的自我 2021-01-23 09:21

In SQLITE database, if I need table meta details, I can run the following command

C:\\sqlite>sqlite3.exe sqlite2.db
SQLite version 3.7.15 2012-12-12 13:36:53
         


        
2条回答
  •  被撕碎了的回忆
    2021-01-23 10:02

    you can get a lot of details in the following way

    from sqlalchemy import *
    
    db_target = create_engine('sqlite:///C:\\Users\\asit\\workspace\\forum1\\src\\sqlite.db')
    target_metadata = MetaData(db_target)
    src_master_table = Table('forum_forum', src_metadata, autoload=True )
    print src_master_table.columns._data 
    

提交回复
热议问题