Search notes:

SQLite: PRAGMA table_info

pragma table_info('tab_name') and its select interface display the column information of the table named tab_name.

Return columns

pragma table_info returns 6 columns:
Column name Comment
cid Column id.
name
type data types
notnull Indicates if column has a not null constraint.
dflt_value The default value for the column.
pk 0: column does not participate in a primary key constraint. Otherwise the position of the primary key.
This list can, of course, be found using this very pragma:
.header on
.mode   columns
.width  3 4 4 7 10 2

pragma table_info('pragma_table_info');
--
-- cid  name  type  notnull  dflt_value  pk
-- ---  ----  ----  -------  ----------  --
-- 0    cid         0                    0 
-- 1    name        0                    0 
-- 2    type        0                    0 
-- 3    notn        0                    0 
-- 4    dflt        0                    0 
-- 5    pk          0                    0 
Github repository about-sqlite, path: /sql/pragma/table_info/columns.sql

See also

The SQLite shell command .schema.
pragma table_xinfo
pragmas

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758206133, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQLite/sql/pragma/table_info(76): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78