当前位置:网站首页>MySQL simple operation statement
MySQL simple operation statement
2022-04-21 07:34:00 【Wandefer】
--MySQL Database operation
/* Create database */
Create database database_username;
/* Create table *
/*create table Table name
Field name data type Set primary key
Field name data type Is it empty
*/
create table database_username (
Id int primary key,
Name varchar(20) not null,
age int not null,
sex varchar(2) not null
);
/* Add data */
/*insert into Table name The number (ID,NAME,age,sex) Corresponding fill in */
insert into database_username values(1,' Guan yu ',118,' male ');
insert into database_username values(2,' zhaoyun ',112,' male ');
/* Delete statements */
/*delete from Table name From where Field name =‘’ ---- Delete age as 112 Information about the year-old */
delete from database_username where age=112;
/* to update */
/*update Table name set Field name =‘’ From where Field name =‘’*/
update database_username set NAME=' Li Bai ' where Name=' Guan yu '
update database_username set age=100 where age=112;
/* Query statement */
/*select Query all from */
select * from database_username;
/*select Name from Table name Where to find Name =‘’ order( Ascending order ) by Name */
select ID,NAME,age from database_username where NAME=' Guan yu ' order by age;
/* Open the watch lock ( Insert... Directly into the table , Delete )*/
select * from database_username for update;
/* year - month - Japan when : branch : Second time period query */
select * from mes.rmp_msg_detail a
where a.send_time between to_date('2018/10/18 16:46:00','yyyy-mm-dd hh24:mi:ss')
and to_date('2018/10/18 16:48:00','yyyy-mm-dd hh24:mi:ss');
版权声明
本文为[Wandefer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210622427954.html
边栏推荐
猜你喜欢

配置mysql远程访问

Dpdk problem analysis: ice 100g network card RX_ Packets and RX_ Bytes statistical problem

华润微功放CS3850EO,2×40W D 类音频功率放大电路,替换:智浦芯CS8673,TI的TAS5780、TAS5754,国产功放

弱口令-20211221

Unity内置地形Terrain优化

搭建mysql主从复制、读写分离、一主一从

One day study notes

unreal连接MySQL

国产首发USBhub大全,USB HUB2.0,HUB3.0,旺玖PROLIFIC、PL2586、MA8601,和芯润德SL2.2A、SL2.2S,替换汤铭的FE1.1、FE1.1S、、威锋VL810

【眼见非实-Bugku CTF】
随机推荐
Log4j Remote Code Execution Vulnerability verification
搭建mysql主从复制、读写分离、一主一从
CTF-RSA解密脚本
Dpdk-16.04 example demo and internal implementation analysis of monitoring UIO file to detect interrupt
SourceTree版本回溯以及单个改动版本回溯
UFIDA OA vulnerability reproduction manual
教务管理信息系统 一键评价课程脚本
什么是WebSocket
hutool工具 导出excel 自定义样式------excel压缩jar
Unable to resolve dependency for ':app@debug/compileClasspath': Could not download mapsforge-map.jar
Installing deepstream on TX2
字体图标网站---常用汇总
UCOSIII移植到UCOSII—任务挂起/恢复/钩子/(保姆级教程)
Missing key(s) in state_ dict: “module.resnet50.conv1.weight“
Mmio and PMIO Technology
Unity 在Update中限定每几帧执行一次
removeClass 按钮点击添加class效果
Unreal connection to MySQL
Echars 热力图 自定义颜色
用友OA漏洞复现手册