设为首页 加入收藏

TOP

insert小细节,大问题
2015-07-24 11:12:17 来源: 作者: 【 】 浏览:4
Tags: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;

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇innodbnext-keylock解析 下一篇aul学习测试(测)

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Bash 脚本教程——Li (2025-12-26 07:53:35)
·实战篇!Linux shell (2025-12-26 07:53:32)
·整理了250个shell脚 (2025-12-26 07:53:29)
·HyperText Transfer (2025-12-26 07:20:48)
·半小时搞懂 HTTP、HT (2025-12-26 07:20:42)