博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mysql笔记1
阅读量:6911 次
发布时间:2019-06-27

本文共 1126 字,大约阅读时间需要 3 分钟。

 

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

 

转载于:https://www.cnblogs.com/hellcats/p/7711975.html

你可能感兴趣的文章
2.lombok系列2:lombok注解详解
查看>>
redis——学习之路五(简单的C#使用redis)
查看>>
Log4j中为什么设计isDebugEnabled()方法
查看>>
工作文件夹分类
查看>>
CAN协议,系统结构和帧结构
查看>>
Linux查看文件总的数据行数,并按行拆分
查看>>
ReactNative WebView组件详解
查看>>
武汉大学数学专业考研试题参考解答
查看>>
【jquery的setTimeOut定时器使用】
查看>>
HTML5 Video P2P技术研究(转)
查看>>
CAS 单点登录【2】自定义用户验证
查看>>
SQL Server 大数据搬迁之文件组备份还原实战
查看>>
区块链核心技术:拜占庭共识算法之PBFT
查看>>
数据挖掘中的 10 大算法
查看>>
iOS开发系列- 视频MPMoviePlayerController
查看>>
iOS -- 拨打电话
查看>>
模仿CyclicBarrier,自定义自己屏障类
查看>>
Vue+Vue-router微信分享功能
查看>>
1.数码相框-相框框架分析(1)
查看>>
Javascript中的原型继承具体解释
查看>>