当前位置:网站首页>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 ;
边栏推荐
- Spark cluster installation and deployment
- 1922. Count Good Numbers
- Crawler career from scratch (3): crawl the photos of my little sister ③ (the website has been disabled)
- Trial of the combination of RDS and crawler
- Leetcode daily question (2305. fair distribution of cookies)
- 用Redis实现分布式锁
- Crawler career from scratch (II): crawl the photos of my little sister ② (the website has been disabled)
- Go language - IO project
- Jetson nano custom boot icon kernel logo CBOOT logo
- 小王叔叔的博客目录【持续更新中】
猜你喜欢
LeetCode每日一题(1162. As Far from Land as Possible)
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 2 --blinker_ Hello_ WiFi (lighting technology - Mobile App control routine)
Idea uses the MVN command to package and report an error, which is not available
Spark 概述
Hudi学习笔记(三) 核心概念剖析
Beego learning - Tencent cloud upload pictures
[kotlin learning] classes, objects and interfaces - define class inheritance structure
Crawler career from scratch (II): crawl the photos of my little sister ② (the website has been disabled)
【Kotlin疑惑】在Kotlin类中重载一个算术运算符,并把该运算符声明为扩展函数会发生什么?
NPM install installation dependency package error reporting solution
随机推荐
Filter comments to filter out uncommented and default values
LeetCode每日一题(968. Binary Tree Cameras)
Trial of the combination of RDS and crawler
Powerdesign reverse wizard such as SQL and generates name and comment
Leetcode daily question (931. minimum falling path sum)
文件系统中的目录与切换操作
基于opencv实现桌面图标识别
[kotlin learning] classes, objects and interfaces - classes with non default construction methods or attributes, data classes and class delegates, object keywords
Django operates Excel files through openpyxl to import data into the database in batches.
Integrated use of interlij idea and sonarqube
Learning C language from scratch -- installation and configuration of 01 MinGW
Solve editor MD uploads pictures and cannot get the picture address
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
307. Range Sum Query - Mutable
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 2 --blinker_ Hello_ WiFi (lighting technology - Mobile App control routine)
图像修复方法研究综述----论文笔记
1922. Count Good Numbers
数字身份验证服务商ADVANCE.AI顺利加入深跨协 推进跨境电商行业可持续性发展
LeetCode每日一题(1300. Sum of Mutated Array Closest to Target)
Please tell me how to set vscode