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

JavaScript function call classic example code

Table of contents JavaScript function call classi...

LinkedIn revamps to simplify website browsing

Business social networking site LinkedIn recently...

How to install mysql in docker

I recently deployed Django and didn't want to...

How to output Chinese characters in Linux kernel

You can easily input Chinese and get Chinese outp...

Pure js to achieve typewriter effect

This article example shares the specific code of ...

Processing ideas for decrypting WeChat applet packages on PC in node.js

Table of contents Where is the source code of the...

Web Design Tips: Simple Rules for Page Layout

Repetition: Repeat certain page design styles thr...

Detailed explanation of how to use Teleport, a built-in component of Vue3

Table of contents 1. Teleport usage 2. Complete t...

Linux IO multiplexing epoll network programming

Preface This chapter uses basic Linux functions a...

Security configuration and detection of SSL after the website enables https

It is standard for websites to enable SSL nowaday...

HTML table tag tutorial (27): cell background image attribute BACKGROUND

We can set a background image for the cell, and w...

Example code for implementing a pure CSS pop-up menu using transform

Preface When making a top menu, you will be requi...

How to obtain root permissions in a docker container

First, your container must be running You can vie...

Independent implementation of nginx container configuration file

Create a container [root@server1 ~]# docker run -...