当前位置:网站首页>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 /
边栏推荐
- 机器学习基础:用 Lasso 做特征选择
- 8. Go implementation of string conversion integer (ATOI) and leetcode
- be based on. NETCORE development blog project starblog - (14) realize theme switching function
- 1-Redis架构设计到使用场景-四种部署运行模式(上)
- Oracle database knowledge points that cannot be learned (II)
- 不得不会的Oracle数据库知识点(三)
- Day05 table
- Infiltration learning diary day19
- Leetcode 121 best time to buy and sell stock (simple)
- C import Xls data method summary IV (upload file de duplication and database data De duplication)
猜你喜欢
A dichotomy of Valentine's Day
swagger中响应参数为Boolean或是integer如何设置响应描述信息
[common error] custom IP instantiation error
MySQL - use of aggregate functions and group by groups
Thinkphp6 integrated JWT method and detailed explanation of generation, removal and destruction
Future源码一观-JUC系列
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程
功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
[common error] UART cannot receive data error
OS interrupt mechanism and interrupt handler
随机推荐
功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
C import Xls data method summary IV (upload file de duplication and database data De duplication)
All in one 1407: stupid monkey
Some other configurations on Huawei's spanning tree
Leetcode 121 best time to buy and sell stock (simple)
不得不会的Oracle数据库知识点(三)
Mongodb learning notes: command line tools
How to use AHAS to ensure the stability of Web services?
Future source code view -juc series
A-Frame虚拟现实开发入门
功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。
Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience
机器学习基础:用 Lasso 做特征选择
老姜的特点
打印菱形图案
Swagger2 quick start and use
C import Xls data method summary V (complete code)
Oracle database knowledge points (I)
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程
在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习