Sqlite Tips

Post tags: | sqlite | sqlite_tips |

sitepoint.com article Getting Started with SQLite3 – Basic Commands

Information Schema


        sqlite3 tracks.db '.schema sqlite_master'
        
        CREATE TABLE sqlite_master (
          type text,
          name text,
          tbl_name text,
          rootpage integer,
          sql text
        );
        

pragma foreign_key_list


        sqlite3 tracks.db 'PRAGMA foreign_key_list(projects)'
        

        sqlite3 tracks.db 'select distinct type from sqlite_master'