- \c {dbName}
- \copy tableName FROM '/path/to/tableName.csv' DELIMITER ',' CSV HEADER;
Note : Remember to reset the PRIMARY KEY as below:
SELECT setval('table_name_id_seq', (SELECT MAX(id) FROM table_name));
分享 Linux/Apache/PHP+MySQL/Smarty/JQuery/RubyOnRails 的點點滴滴!
沒有留言:
張貼留言