差分

Tep3-onk

158 バイト追加, 2022年9月12日 (月) 17:33
postgres
<nowiki>=# CREATE TABLE jq_clients AS SELECT * FROM clients where jiin_id = 1;
SELECT 3066</nowiki>
 
=# ALTER TABLE jq_clients ADD COLUMN userid uuid;
 
<nowiki>=# update jq_clients SET userid = '44f47a1e-2ccf-4213-bac5-aa62c5f3c141';
UPDATE 3066
</nowiki>
<nowiki>=# COPY (SELECT user_id,jiin_id,ie_id,name,yomi,nusi,each_order,memo,generation,created_at,updated_at FROM jq_clients WHERE jiin_id = 1) TO '/Users/jq/rails_app_tepnote/jq_clients.csv' WITH CSV HEADER;