发布时间:2013-01-26 14:28:18
以下是建表语句CREATE TABLE `test` (`id` int(11) unsigned NOT NULL,`author` varchar(100) NOT NULL,PRIMARY KEY (`id`) );插入时判断是否存在,存在则不做任何操作:insert into test select * from (select 1, 'aa') as tmp where not exists (select * from test where id = 1);或者insert ignore int.........【阅读全文】