zoukankan      html  css  js  c++  java
  • 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;

  • 相关阅读:
    枚举类型的应用
    动手动脑
    四则运算和验证码--源码
    ATM源码
    javabean+jsp+servlet+jdbc
    四则运算改良
    Java异常
    课后总结
    包装类Integre
    对象验证
  • 原文地址:https://www.cnblogs.com/tlnshuju/p/6893499.html
Copyright © 2011-2022 走看看