当前位置:网站首页>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 ;
边栏推荐
- 从0开始使用pnpm构建一个Monorepo方式管理的demo
- Database execution error: SQL_ mode only_ full_ group_ by:
- Hudi学习笔记(三) 核心概念剖析
- Temper cattle ranking problem
- LeetCode每日一题(968. Binary Tree Cameras)
- Flink-CDC实践(含实操步骤与截图)
- Flink学习笔记(十)Flink容错机制
- Construction of simple database learning environment
- Spark overview
- Hudi learning notes (III) analysis of core concepts
猜你喜欢

Crawler career from scratch (I): crawl the photos of my little sister ① (the website has been disabled)

There is no open in default browser option in the right click of the vscade editor

LeetCode每日一题(931. Minimum Falling Path Sum)

Temper cattle ranking problem

Run flash demo on ECS

Crawler career from scratch (IV): climb the bullet curtain of station B through API

Arduino handles JSON data, arduinojson assistant

Solve the problem of disordered code in vscode development, output Chinese and open source code

Crawler career from scratch (3): crawl the photos of my little sister ③ (the website has been disabled)

Hudi 集成 Spark 数据分析示例(含代码流程与测试结果)
随机推荐
【Kotlin疑惑】在Kotlin类中重载一个算术运算符,并把该运算符声明为扩展函数会发生什么?
Word segmentation in full-text indexing
Banner - Summary of closed group meeting
About the configuration of vs2008+rade CATIA v5r22
Run flash demo on ECS
Hudi 数据管理和存储概述
文件系统中的目录与切换操作
Vscode Arduino installation Library
There is no open in default browser option in the right click of the vscade editor
[solution to the new version of Flink without bat startup file]
Leetcode daily question (931. minimum falling path sum)
QT sub window is blocked, and the main window cannot be clicked after the sub window pops up
Jestson nano custom root file system creation (supports the smallest root file system of NVIDIA Graphics Library)
Starting from 0, use pnpm to build a demo managed by monorepo
ERROR: certificate common name “*.” doesn’t match requested ho
[CSDN]C1训练题解析_第三部分_JS基础
Explanation of the answers to the three questions
Implementing distributed lock with redis
Leetcode daily question (968. binary tree cameras)
一款开源的Markdown转富文本编辑器的实现原理剖析