日期:2014-05-16 浏览次数:20411 次
例子:l_amount_temp是临时字段, L_AMOUNT是要修改的字段.
?
?
alter table LAW_LITIGATION_CASE add l_amount_temp int; alter table LAW_LITIGATION_CASE modify L_AMOUNT NULL; update LAW_LITIGATION_CASE set l_amount_temp=L_AMOUNT,L_AMOUNT=NULL; commit; alter table LAW_LITIGATION_CASE modify L_AMOUNT float(24); update LAW_LITIGATION_CASE set L_AMOUNT= l_amount_temp, l_amount_temp=NULL; commit; alter table LAW_LITIGATION_CASE drop column l_amount_temp; alter table LAW_LITIGATION_CASE modify L_AMOUNT NOT NULL;