Skip navigation.

极湖

无不用其“极”

MySQL下复制表格的方法

两步走:
CREATE TABLE new_table LIKE original_table;
INSERT INTO new_table SELECT * FROM original_table;

这样做的好处是同时复制表格的主键等。

如果只是复制数据:
CREATE TABLE new_table AS SELECT * FROM original_table;

即可。

escape(), encodeURI(), encodeURIComponent() 的区别给 javascript 的 String 增加 replaceAll 方法

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31