User Tools

Site Tools


projects:sandbox:database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
projects:sandbox:database [2023/03/11 01:54] – [database] jhagstrandprojects:sandbox:database [2023/03/11 01:54] (current) jhagstrand
Line 9: Line 9:
   psql -U voyccom_jhagstrand -d voyccom_mai   psql -U voyccom_jhagstrand -d voyccom_mai
   (password is in .pgpass)   (password is in .pgpass)
 +  
   \h list SQL commands   \h list SQL commands
   \? list psql commands   \? list psql commands
   \dt list tables in public schema   \dt list tables in public schema
 +  
   SELECT * FROM information_schema.tables WHERE table_schema = 'mai';   SELECT * FROM information_schema.tables WHERE table_schema = 'mai';
 +  
   SELECT column_name, data_type FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'mai';   SELECT column_name, data_type FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'mai';
 +  
   select table_schema, table_name from information_schema.tables where table_schema not in ('public','pg_catalog','information_schema') group by table_schema, table_name order by table_schema,table_name;   select table_schema, table_name from information_schema.tables where table_schema not in ('public','pg_catalog','information_schema') group by table_schema, table_name order by table_schema,table_name;
  
projects/sandbox/database.1678517662.txt.gz · Last modified: 2023/03/11 01:54 by jhagstrand

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki