摘要: //添加主键 alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);//增加一个新列alter table rpt_fmp_eleven_auction_info_d_01 add iuv bigint(20) default NULL comment 'iuv';//删除列 alter table t2 drop column c;//重命名列 alter table t1 change a 阅读全文
posted @ 2013-10-30 11:55 李秋 阅读(385) 评论(0) 推荐(0)
摘要: 方法一(一般不使用,多线程可能不准确)SELECT MAX(id) FROM table方法二(一般使用这个)SELECT LAST_INSERT_ID() 阅读全文
posted @ 2013-10-30 10:31 李秋 阅读(215) 评论(0) 推荐(0)