postgresql 複製表

1. INSERT INTO FROM 語句

insert into tablebackup select * from table;
insert into tablebackup select field1,field2,field3 from table where ...;

前提:tablebackup 必須存在

2. SELECT INTO FROM 語句

select * into tablebackup from table;
select field1,field2,field3 into tablebackup from table;

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章