[关闭]
@931876502 2016-09-29T16:42:24.000000Z 字数 282 阅读 387

postgresql重置自增主键

postgresql


postgresql重置自增主键:

  1. TRUNCATE TABLE order_to_restore ;
  2. ALTER SEQUENCE order_to_restore_otr_id_seq RESTART WITH 1;

导出表数据到CSV文件:

  1. copy (SELECT ip_format,ip,country, area, region, city, county FROM analytics_ip_data where area is not null) to '/tmp/ip/analytics_ip_data.csv' DELIMITER ',' CSV;
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注