-
Book Overview & Buying
-
Table Of Contents
Learning SQLite for iOS
By :
SQLite offers several commands as part of a command set to get information about the contents of a database. For example, to get a list of tables, use the .table command. To find a specific table name, use a % symbol and text as a pattern to find the result, for example, .tables [pattern], as shown in the following screenshot. By issuing the .tables command and appending a %te% text to it, is a request to SQLite to list all its tables within the database that has the word te (in our case temp) in their name which are displayed correctly:

Prior to the following example, a temp_idx index has been created, to get a list of indexes for the temp table, at the sqlite3 prompt .indices temp, which is actually the .indices command followed by the table name, as shown here:

By using the preceding command, the temp table's index can be seen.
To view the schema of the database, the following command can be issued, .schema, but type the .schema <...
Change the font size
Change margin width
Change background colour