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
    
    但愿人长久 千里共婵娟
  • 相关阅读:
    判断文件结束,feof……
    第五篇 分治思想(例子待加)
    第四篇 枚举思想
    第三篇 贪心思想
    第二篇 递归思想
    第一篇 递推思想
    爬虫系列
    整数划分问题
    html中a标签做容器的问题
    H5学习小结——div+css创建电子商务静态网页
  • 原文地址:https://www.cnblogs.com/hellcats/p/7711975.html
Copyright © 2011-2022 走看看