当前位置:网站首页>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.
边栏推荐
猜你喜欢
随机推荐
Float.parseFloat()的作用
OneNote 教程,如何在 OneNote 中检查拼写?
差点被ECCV错过的论文:视频理解新框架,仅用微调的「成本」,达到预训练的「全能」...
uni-app微信小程序如何渲染markdown
riscv-gnu-toolchain下载安装
What are the role of document management system for companies?
解决执行Command报错fork/exec /xxx/yy: no such file or directory
Kotlin-学习的第五天之Handler
PyTorch入门(六):模型的训练套路
基于opencv的图片人像移除
场外基金开户在手机办理安全吗?
fillder4不间断提示the system proxy was change,看我解决
1088 N的阶乘
西湖大学鞠峰组招聘【塑料降解 / 污水工程 / 微生物学】方向博士后和科研助理...
Experience Sharing | A low-cost and fast-paced approach to building an enterprise knowledge management system
Kotlin委托属性知识点
瑞吉外卖项目实战Day06--手机端
Gartner:2022年全球半导体收入增长预计将放缓至7%,远低于2021年26.3%
技术分享活动
箭头函数this指向的解释









