当前位置:网站首页>Mysql management commands
Mysql management commands
2022-08-08 20:32:00 【Do not forget the original intention z】
Article table of contents
Mysql database management commands
Query statements start with select
For example, query the mysql version number
select version() query the current mysql version number
describe table name query table data type
insert into table name values InsertA piece of data
update update data
help help command, which will list some commonly used commands
show databases; query all databases
create database database name; create database
drop database database name; deletedatabase
use database name; enter database
show tables +table name enter table input
show columns from +table name view table properties
show view display extensive server status information
show create database| show create table is used to display the creation of a specific database table and mysql statement respectively
order by +id The field of the order by +id is id The sort order is the order of A-Z, if it is a descending order, you need to add the DESC keyword to DESC onlyWorks on the front face list
Mysql operator
AND, && Logical AND
NOT, ! Negative Value
OR, || Logical OR
XOR Logical Exclusive Or
Mysql database_table management command
create table users; create a table followed by parentheses to set properties
->(id,int primary key, create id and set the primary key
-> name text);
show tables View database tables
drop table users delete the specified database table
Mysql command in use
1.CASCADE: Delete or update from the parent table and automatically delete or update the matching row in the child table.
2.SET NULL: Delete or update rows from the parent table, and set the foreign key column in the child table to NULL.If you use this option, you must ensure that the subtable column does not specify NOT NULL.
3. RESTRICT: Deny delete or update operations on the parent table.
4 NO ACTION: keyword of standard SQL, same as RESTRICT in MySQL.
边栏推荐
- OneNote 教程,如何在 OneNote 中检查拼写?
- WPF主窗体调用 User32的SetWindowPos 设置窗体置顶会导致与其他窗体抢夺焦点的问题
- 树形DP总结
- 0-1 背包问题
- 通达信炒股软件正规吗?安全吗?
- The WPF main form calls User32's SetWindowPos to set the form to the top, which will cause the problem of grabbing the focus with other forms
- 文档管理系统对于企业来说有哪些作用?
- Maykel Studio OpenHarmony Device Development Training Notes - Chapter 6 Study Notes
- 经验分享|低成本快节奏搭建企业知识管理系统的方法
- WPF主窗体调用 User32的SetWindowPos 设置窗体置顶会导致与其他窗体抢夺焦点的问题
猜你喜欢
【无标题】
Maykel Studio OpenHarmony Device Development Training Notes - Chapter 6 Study Notes
梅科尔工作室OpenHarmony设备开发培训笔记-第六章学习笔记
SushiSwap「SUSHI」下降了 93%,但还没有完全消失
深度学习初步认知
高数_复习_第3章:一元函数积分学
Gartner:2022年全球半导体收入增长预计将放缓至7%,远低于2021年26.3%
VSCode 必知必会的 20 个快捷键
我们仍未知道那天踩的MultipartFile file为null的大坑是为什么
随手记:laravel、updateOrCreate 和 updateOrInsert 的区别
随机推荐
记一次坎坷的调试|Mosquitto通过TLS连接EMQ时阻塞的问题
MySQL权限管理
树形DP总结
技术分享 | 接口自动化测试之JSON Schema模式该如何使用?
JSD-2204-Session-Token-JWT-Day12
tar zcf是单线程瓶颈
曲面着色器初试--地面轨迹模拟(部分细节不完善)
Redis布隆过滤器
PHPUnit 单元测试
简单Swing界面笔记
Kotlin注解
树查找(暑假每日一题 18)
新库上线 | CnOpenData信息传输、软件和信息技术服务业工商注册企业基本信息数据
买股票安全吗 资金能取出来吗
借问变量何处存,牧童笑称用指针,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang类型指针(Pointer)的使用EP05
网络工程师怎么系统性学习?这份网工资料包帮你解决
同花顺买股票软件正规吗?安全吗?
1259 Alice and Bob
WPF主窗体调用 User32的SetWindowPos 设置窗体置顶会导致与其他窗体抢夺焦点的问题
WPF主窗体调用 User32的SetWindowPos 设置窗体置顶会导致与其他窗体抢夺焦点的问题