_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › PostgreSQL覃覈

Contents

1 distinct on
2 Run external script in psql
3 link


1 distinct on #

--title覲 螳  customer_id fname 譟壱
select distinct on (title) title , customer_id, fname
from (select * from customer order by title, customer_id desc) t

2 Run external script in psql #

psql mydb < dump.sql
psql mydb -f dump.sql

psql -d mydb -f dump.sql

or

psql -f dump.sql mydb


psql [database name] < [script name]

testdb=# \i [script name]

蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

覦襯 螳 企Π 豕螻 覓殊企.