当前位置:网站首页>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 ;
边栏推荐
- Please tell me how to set vscode
- Flink学习笔记(十)Flink容错机制
- Jetson nano custom boot icon kernel logo CBOOT logo
- Derivation of Fourier transform
- 文件系统中的目录与切换操作
- 1922. Count Good Numbers
- QT sub window is blocked, and the main window cannot be clicked after the sub window pops up
- 软件测试工程师是做什么的 通过技术测试软件程序中是否有漏洞
- Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 1 -- establishment of engineering template -template
- Spark cluster installation and deployment
猜你喜欢

Win10 quick screenshot

Flink learning notes (VIII) multi stream conversion
![[kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions](/img/a3/b442508af9b059d279cffb34dee9bf.png)
[kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions

Vscode Arduino installation Library

PolyWorks script development learning notes (III) -treeview advanced operation
![[set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)](/img/fd/c0f885cdd17f1d13fdbc71b2aea641.jpg)
[set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)
![Uncle Wang's blog directory [constantly updating]](/img/91/72cdea3eb3f61315595330d2c9016d.png)
Uncle Wang's blog directory [constantly updating]

Detailed steps of windows installation redis

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

软件测试工程师是做什么的 通过技术测试软件程序中是否有漏洞
随机推荐
Leetcode daily question (2090. K radius subarray averages)
Jestson nano custom root file system creation (supports the smallest root file system of NVIDIA Graphics Library)
[kotlin puzzle] what happens if you overload an arithmetic operator in the kotlin class and declare the operator as an extension function?
[CSDN]C1训练题解析_第三部分_JS基础
Uncle Wang's blog directory [constantly updating]
Matlab dichotomy to find the optimal solution
LeetCode每日一题(931. Minimum Falling Path Sum)
Basic knowledge of database design
Hudi 快速体验使用(含操作详细步骤及截图)
1300. sum of varied array closed to target
Spark structured stream writing Hudi practice
Global KYC service provider advance AI in vivo detection products have passed ISO international safety certification, and the product capability has reached a new level
用Redis实现分布式锁
DSP data calculation error
Flink-CDC实践(含实操步骤与截图)
Derivation of Fourier transform
Common software open source protocols
LeetCode每日一题(1300. Sum of Mutated Array Closest to Target)
Temper cattle ranking problem
The number of weak characters in the game (1996)