当前位置:网站首页>MySQL statement learning record
MySQL statement learning record
2022-07-04 01:18:00 【Programmer base camp】
1. Library related commands
Create database : create database Library name ;
Query all database names :show databases;
Delete database :drop database Library name ;
Access to database use Library name ;
View your current library :select database();
**
2. Table related commands
Create table :create table Table name (
Name data type ,
>>>>
Name data type );
See the table show tables;
Check all tables in other libraries :show tables from Library name ;**
View table structure :desc Table name ;
Insert table data :insert into Table name ( Property name 1, Property name 2) values( data 1,‘ data 2’);

Query the current table data **: select * from Table name ;**
Delete data :delete from gameinfo where id=1;
Modifying data :update gameinfo set name=‘xq’ where id=2;
Modify the name of the table :rename table The old name of the table to The new name of the table ;
**
3. Other commands
View the current MySQL Server version :select version();
No sign in to mysql Query method when :mysql --version perhaps mysql --V
sign out mysql: exit perhaps \q
4. Grammatical norms
1)mysql Case insensitive
2) Each command ends with a semicolon
3) notes
Single-line comments :# Note text
Single-line comments :-- Note text
Multiline comment :/ Note text /
边栏推荐
- Oracle database knowledge points (I)
- How to delete MySQL components using xshell7?
- 51 MCU external interrupt
- Which insurance products can the elderly buy?
- [common error] UART cannot receive data error
- Gnupg website
- Understanding of Radix
- 51 single chip microcomputer timer 2 is used as serial port
- 手机异步发送短信验证码解决方案-Celery+redis
- Unity Shader入门精要读书笔记 第三章 Unity Shader基础
猜你喜欢
![[common error] UART cannot receive data error](/img/77/6ba56ce6e64beeb73a77d04af5bd0f.jpg)
[common error] UART cannot receive data error

Avoid playing with super high conversion rate in material minefields

AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用

Introduction to unity shader essentials reading notes Chapter III unity shader Foundation

Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience

How to set the response description information when the response parameter in swagger is Boolean or integer

GUI application: socket network chat room

打印菱形图案

Beijing invites reporters and media

Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services
随机推荐
51 MCU external interrupt
Gnupg website
“疫”起坚守 保障数据中台服务“不打烊”
A malware detection method for checking PLC system using satisfiability modulus theoretical model
Who moved my code!
QML add gradient animation during state transition
[dynamic programming] leetcode 53: maximum subarray sum
GUI application: socket network chat room
Long article review: entropy, free energy, symmetry and dynamics in the brain
Leetcode 121 best time to buy and sell stock (simple)
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
Gee: create a new feature and set corresponding attributes
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
不得不会的Oracle数据库知识点(二)
HackTheBox-baby breaking grad
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
A-Frame虚拟现实开发入门
Characteristics of ginger
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
7.1 学习内容