当前位置:网站首页>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 /
边栏推荐
- [common error] custom IP instantiation error
- 8. Go implementation of string conversion integer (ATOI) and leetcode
- gslb(global server load balance)技术的一点理解
- Introduction to A-frame virtual reality development
- Summary of common tools and technical points of PMP examination
- 在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
- All in one 1407: stupid monkey
- What is the GPM scheduler for go?
- It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
- 中电资讯-信贷业务数字化转型如何从星空到指尖?
猜你喜欢

功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。

基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能

“疫”起坚守 保障数据中台服务“不打烊”

It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction

Infiltration learning diary day19

Beijing invites reporters and media

1-Redis架构设计到使用场景-四种部署运行模式(上)

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.

Gee: create a new feature and set corresponding attributes

From functional testing to automated testing, how did I successfully transform my salary to 15K +?
随机推荐
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示
Oracle database knowledge points (IV)
不得不会的Oracle数据库知识点(三)
The super fully automated test learning materials sorted out after a long talk with a Tencent eight year old test all night! (full of dry goods
Cesiumjs 2022^ source code interpretation [8] - resource encapsulation and multithreading
Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL
[dynamic programming] leetcode 53: maximum subarray sum
Characteristics of ginger
Summary of common tools and technical points of PMP examination
不得不会的Oracle数据库知识点(四)
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
MySQL uses the view to report an error, explain/show can not be issued; lacking privileges for underlying table
Analysis and solution of lazyinitializationexception
Introduction to A-frame virtual reality development
Ka! Why does the seat belt suddenly fail to pull? After reading these pictures, I can't stop wearing them
How to set the response description information when the response parameter in swagger is Boolean or integer
技術實踐|線上故障分析及解决方法(上)
我管你什么okr还是kpi,PPT轻松交给你
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.