zoukankan      html  css  js  c++  java
  • Mysql笔记1

    1.Insert

    INSERT INTO `mes`.`prc_operation_history`
    (`factory_name`,
    `name`,
    `timekey`,
    `create_time`,
    `create_user`,
    `last_event_time`,
    `last_event_user`,
    `type`)
    VALUES
    ('Module',
    '73000',
    '2017/10/19/12/35',
    '2017/10/19/12/35',
    'admin',
    '2017/10/19/12/35',
    'admin',
    'R');
    View Code
     

     2.UpDate

    update job_lot_history set last_event_name='trackin' where true=true;

    update rtm_machine_history set machine_state_name='idel' where timekey='2017/10/20/13/12';

     3.Select

    select * from job_lot_history;
    

     4.Create

    create temporary table `job_product_history_temp` like `job_product_history`;
    

     5.Truncate

    truncate job_product_history_temp;
    

     6.Drop

    drop table job_product_history_temp;
    

     7.复制表以及表中内容

    create temporary table `job_lot_history_temp` like `job_lot_history`;
    insert into job_lot_history_temp (select * from job_lot_history);
    update job_lot_history_temp set last_event_name = 'trackout' where true = true;
    update job_lot_history_temp set timekey = date_add(timekey,interval  12 hour) where true = true;
    insert into job_lot_history (select * from job_lot_history_temp);
    select * from job_lot_history_temp
    
    但愿人长久 千里共婵娟
  • 相关阅读:
    jQuery Lazy Load 图片延迟加载
    jquery多级联动(ajax查数据库)
    在命令行快速切换目录(转载)
    推荐Mac软件Alfred
    Vim的snipMate插件
    腾讯CMEM的PHP扩展(转载)
    svn hooks使用
    samba基本配置
    linux进程状态详解(转)
    elk systemd管理
  • 原文地址:https://www.cnblogs.com/hellcats/p/7711975.html
Copyright © 2011-2022 走看看