insert小细节,大问题,insert细节,问题
今天现场报流程无法查看,已查看流程表中没有数据了。昨天有执行过删除垃圾数据的脚步,大致过程是:
create table bak_test a as select * from test;
create table test_temp(id ..,name ..,code,...);
insert into test_temp select * from test where flag=1;--这句话报错,原因是公司环境与现场环境字段顺序不一致导致
rename test to test_bak;
rename test_temp to test;
所以不要偷懒,一定要加上详细的字段,inser into test_temp(id,name,code ....) select id,name,code .... from test where flag=1;
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。