当前位置:网站首页>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 /
边栏推荐
- 基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
- Related configuration commands of Huawei rip
- C import Xls data method summary I (upload files and create Workbooks)
- 功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
- How to use AHAS to ensure the stability of Web services?
- AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用
- PMP 考试常见工具与技术点总结
- Msp32c3 board connection MSSQL method
- Characteristics of ginger
- 2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
猜你喜欢
Since the "epidemic", we have adhered to the "no closing" of data middle office services
手机异步发送短信验证码解决方案-Celery+redis
Make drop-down menu
GUI application: socket network chat room
On covariance of array and wildcard of generic type
“疫”起坚守 保障数据中台服务“不打烊”
Technical practice online fault analysis and solutions (Part 1)
How to set the response description information when the response parameter in swagger is Boolean or integer
Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
A malware detection method for checking PLC system using satisfiability modulus theoretical model
随机推荐
C import Xls data method summary II (save the uploaded file to the DataTable instance object)
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
Design of database table foreign key
On covariance of array and wildcard of generic type
老姜的特点
A malware detection method for checking PLC system using satisfiability modulus theoretical model
求esp32C3板子连接mssql方法
在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
不得不会的Oracle数据库知识点(二)
The culprit of unrestrained consumption -- Summary
C library function int fprintf (file *stream, const char *format,...) Send formatted output to stream
12. Go implementation of integer to Roman numeral and leetcode
Function: find the approximate value of the limit of the ratio of the former term to the latter term of Fibonacci sequence. For example, when the error is 0.0001, the function value is 0.618056.
PMP 考试常见工具与技术点总结
Function: write function fun to find s=1^k+2^k +3^k ++ The value of n^k, (the cumulative sum of the K power of 1 to the K power of n).
51 MCU external interrupt
Severity code description the project file line prohibits the display of status error c4996 fopen ('fscanf ', StrCmp): this function or variable may be unsafe The most comprehensive solution
Audio resource settings for U3D resource management
Oracle database knowledge points (I)
A dichotomy of Valentine's Day