PostgreSQL Example Queries
From SnOwy - Ed's Wiki Notebook
- get the most recent insertion on a given table that has an autoincremented value
SELECT processid FROM contig_human ORDER BY id DESC LIMIT 1;
- using a posix pipe (stdin) and half-pipe (stdout)
echo "select * from contig_eddie1 order by id desc limit 1;" | psql EM_AiTraceAssembley -h 192.168.12.11 -f - > DemoSelect.txt