MySQL Clone/Duplicate Record with Unique ID

#Get Lastest Unique ID from the table you want to duplicate
SELECT (@unique:=MAX(id)+1) AS uniq FROM tbl_Original;

#Create a Temp Table then Select the record you want to duplicate
CREATE TEMPORARY TABLE temptbl ENGINE=MyISAM SELECT * FROM tbl_Original WHERE id=123;

#Update the Temp Table using the Lastest Unique ID from the Original Table
UPDATE temptbl SET [email protected];

#INSERT into the source table from the Temp Table
INSERT INTO tbl_Original SELECT * FROM temptbl;

#Drop the Temp Table
DROP TABLE temptbl;

Postcode (Do you know it?)

今天research了一下马来西亚的邮局编号,POS Malaysia 的网页down了就去Wiki
发现:

The postal codes used in Malaysia is a 5 digit code. Listed below are the first 2 digits of codes assigned to each state and special administrative area. The state capital is indicated in the brackets.

Federal Territories (Wilayah Persekutuan)
Kuala Lumpur uses codes from 50xxx to 60xxx and 68xxx
Labuan uses codes 87xxx
Putrajaya uses codes 62xxx
Selangor (Shah Alam) uses codes from 4xxxx
Terengganu (Kuala Terengganu) uses codes from 2xxxx
Sarawak (Kuching) uses codes from 9xxxx
Sabah (Kota Kinabalu) uses codes from 8xxxx
Sarawak (Kuching) uses codes from 93xxx to 98xxx
Sabah (Kota Kinabalu) uses codes from 88xxx to 91xxx

Kedah (Alor Setar) uses codes from 05xxx
Kelantan (Kota Bharu) uses codes from 1xxxx
Negeri Sembilan (Seremban) uses codes from 7xxxx
Pulau Pinang (Georgetown) uses codes from 1xxxx
Johor (Johor Bahru) uses codes from 8xxxx
Melaka (Melaka) uses codes from 7xxxx
Perlis (Kangar) uses codes from 01xxx
Perak (Ipoh) uses codes from 3xxxx
Pahang (Kuantan) uses codes from 2xxxx

黄色的是原本WIKI的资料,绿色是我改了的 :p

我个人很喜欢英国的邮局编号的编排方式很方便和很有系统,至于马来西亚的。。。自己想象