Simple implementation of Mysql add, delete, modify and query statements

Simple implementation of Mysql add, delete, modify and query statements

Simple implementation of Mysql add, delete, modify and query statements

Added record:

insert into tablename(...) values(...)
//If the added record includes all columns, there is no need to write the data list insert into tablename values(...)

Delete Records:

delete from tablename where condition ;

Modification history:

update tablename set xx=xx , xx=xx... where condition ;

alter table tablename set xx=xx , xx=xx... where condition ;

Query records:

select (...) from tablename where condition ;

select * from tablename where condition ;

Delete the entire table:

drop table tablename ;

Add columns:

alter table tablename add column columnname columntype ... ;

To delete a column:

alter table tablename drop column columnname ;

Thank you for reading, I hope it can help you, thank you for your support of this site!

You may also be interested in:
  • mysql add, delete, modify and query basic statements
  • MySQL trigger trigger add, delete, modify and query operation example
  • Summary of Mysql table, column, database addition, deletion, modification and query problems
  • MySQL detailed single table add, delete, modify and query CRUD statements
  • Detailed explanation of MySQL view management view example [add, delete, modify and query operations]
  • MySQL table addition, deletion, modification and query basic tutorial

<<:  How to manually upgrade the node version under CentOs

>>:  How to use type enhancement without typingscript

Recommend

Detailed explanation of Redis master-slave replication practice using Docker

Table of contents 1. Background 2. Operation step...

Analysis of Linux boot system methods

This article describes how to boot the Linux syst...

Troubleshooting ideas and solutions for high CPU usage in Linux systems

Preface As Linux operation and maintenance engine...

Example of how rem is adapted for mobile devices

Preface Review and summary of mobile terminal rem...

Detailed explanation of flex and position compatibility mining notes

Today I had some free time to write a website for...

Detailed installation tutorial of Mysql5.7.19 under Centos7

1. Download Download mysql-5.7.19-linux-glibc2.12...

Detailed discussion of several methods for deduplicating JavaScript arrays

Table of contents 1. Set Deduplication 2. Double ...

Linux system prohibits remote login command of root account

ps: Here is how to disable remote login of root a...

HTML/CSS Basics - Several precautions in HTML code writing (must read)

The warning points in this article have nothing t...

Practical record of vue using echarts word cloud chart

echarts word cloud is an extension of echarts htt...

CSS cleverly uses gradients to achieve advanced background light animation

accomplish This effect is difficult to replicate ...

Detailed tutorial on uploading and configuring jdk and tomcat on linux

Preparation 1. Start the virtual machine 2. git t...

npm Taobao mirror modification explanation

1. Top-level usage 1. Install cnpm npm i -g cnpm ...