Hi,

no question here, just wanted to share a little discovery :)
Since sqlite_master is a general table, one can format and order things
differently.
I used to use simple

  Select * from sqlite_master

... for querying everyting related to structure, but the following query
can show the things more organized (indention for indexes and triggers)

SELECT type, (case when type='table' then name else '   '||name end) as
name, tbl_name, sql
FROM
  sqlite_master
ORDER BY
  tbl_name, case when type='table' then '0' else type end

Maybe others can share some other tricks with sqlite_master here

Thanks,

Max
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to