当前位置:网站首页>MySQL Data Definition Language DDL common commands
MySQL Data Definition Language DDL common commands
2022-07-03 09:36:00 【chenhyc】
【1】 Sign in mysql database ( When the environment variable is not set ):
(1)cmd, Get into mysql The installation directory bin
cd C:\Program Files\MySQL\MySQL Server 5.7\bin
(2) Input :mysql -u root -p, Input mysql password , Sign in 
【2】 Create database :create database Database name ;
remarks : It ends with a semicolon 
【3】 Query the database :show databases;
【4】 Query the name of the created database :show create database hss;
【5】 Delete database :drop database Database name ;
【6】 Query supported storage engines :show engines \g
remarks :yes Indicates that it can be used ,no Indicates not available ,default Indicates the current default storage engine 
【7】 Using a database :use Database name ;
【8】 Check how many tables the database uses :show tables;
【9】 Query table structure :desc The name of the table ;
【10】 Add table column structure :alter table The name of the table add Column name type ;
【11】 Modify table name :rename table Original table name to New table name 
【12】 Create a column structure :create table The name of the table ( Column name 1 type , Column name 2, type );
【13】 Change the character set to gbk:alter table The name of the table character set gbk;
【14】 View the creation details of the table :show create table The name of the table ;
【15】 Change the column name of the table :alter table The name of the table change Original column name New column names data type ;
【16】 Delete table :drop table The name of the table ;
边栏推荐
- Win10 install elk
- Installation and uninstallation of pyenv
- The idea of compiling VBA Encyclopedia
- ERROR: certificate common name “*.” doesn’t match requested ho
- Spark cluster installation and deployment
- PolyWorks script development learning notes (II) -treeview basic operations
- Matlab dichotomy to find the optimal solution
- Common formulas of probability theory
- LeetCode每日一题(745. Prefix and Suffix Search)
- PowerDesigner does not display table fields, only displays table names and references, which can be modified synchronously
猜你喜欢

Trial of the combination of RDS and crawler

Win10 install elk

Flink学习笔记(十一)Table API 和 SQL

Learning C language from scratch -- installation and configuration of 01 MinGW

Construction of simple database learning environment

Flask+supervisor installation realizes background process resident

Flink学习笔记(八)多流转换

Using Hudi in idea

Leetcode daily question (1162. as far from land as possible)

Detailed steps of windows installation redis
随机推荐
Uncle Wang's blog directory [constantly updating]
Trial of the combination of RDS and crawler
Send mail using WP mail SMTP plug-in
Implementing distributed lock with redis
Flink learning notes (VIII) multi stream conversion
Idea uses the MVN command to package and report an error, which is not available
The idea of compiling VBA Encyclopedia
PowerDesigner does not display table fields, only displays table names and references, which can be modified synchronously
Learning C language from scratch -- installation and configuration of 01 MinGW
基于opencv实现桌面图标识别
QT sub window is blocked, and the main window cannot be clicked after the sub window pops up
LeetCode每日一题(985. Sum of Even Numbers After Queries)
【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
Jestson Nano自定义根文件系统创建(支持NVIDIA图形库的最小根文件系统)
Leetcode daily question (516. long palindromic subsequence)
PolyWorks script development learning notes (II) -treeview basic operations
Spark structured stream writing Hudi practice
Flask+supervisor installation realizes background process resident
Flink学习笔记(八)多流转换
Leetcode daily question (1024. video sticking)