RootsLabs

More than a tool ! GitHub Google+ LinkedIn RSS

Extraire la structure d’une BD sous SQLite

Progi1984 - Commentaires (0)

Afin de poursuivre ma recherche, je me suis dirigé vers SQLite aprés PostgreSQL.

-- listing database from server
-- No Server in SQLite

-- listing users
-- No Users management in SQLite

-- listing groups
-- No Users management in SQLite

-- listing bases
-- No Multiples bases management in SQLite

-- listing tables from a base
SELECT name FROM sqlite_master WHERE type='table';

-- listing tables from a base > COLUMNS
PRAGMA table_info('mytable')

-- listing tables from a base > CONSTRAINTS > PRIMARY KEY
PRAGMA table_info('mytable')

-- listing tables from a base > CONSTRAINTS > FOREIGN KEY
PRAGMA foreign_key_list('mytable')

-- listing views from a base
SELECT name FROM sqlite_master WHERE type ='view'

-- listing types from a base
-- NO User Defined Types in SQLite

-- listing indexes from a base
SELECT name FROM sqlite_master WHERE type='index';

-- listing functions from a base
-- NO Functions or Stored Procedures in SQLite

-- listing triggers from a base
SELECT name FROM sqlite_master WHERE type='trigger';

Ajouter un commentaire

Commentaire :