Practical method of deleting a row in a MySql table

Practical method of deleting a row in a MySql table

First, you need to determine which fields or field combinations can uniquely identify your row of data.

DELETE FROM table name WHERE field1 = '' and field2 = '' and ...field1, ... are the field combinations that can uniquely identify a row of data. Fill in the field you want to

The specific value of the deleted field can be

If there is a primary key, you can directly use the primary key to identify a row.

DELETE FROM table name WHERE primary key = 'specific value'.

delete from ms_cf01 where brxm='张三' and id='7598';

Among them: ms_cf01 is the table to which the data you want to delete belongs.

brxm, id is the condition for deleting data.

The above statement achieves the following effect: delete the row data in table ms_cf01 where brxm is equal to Zhang San and id is equal to 7598.

This completes the operation of deleting a row of data.

You may also be interested in:
  • MySQL table deletion operation implementation (differences between delete, truncate, and drop)
  • Summary of methods for finding and deleting duplicate data in MySQL tables
  • Cause Analysis and Solution of I/O Error When Deleting MySQL Table
  • Detailed example of creating and deleting tables in MySQL
  • Simple implementation of ignoring foreign key constraints when deleting MySQL tables
  • How to delete a MySQL table

<<:  Detailed explanation of the loading rules of the require method in node.js

>>:  How to set up swap partition SWAP in Linux 7.7

Recommend

Explanation of the execution priority of mySQL keywords

As shown below: from table where condition group ...

Windows system mysql5.7.18 installation graphic tutorial

MySQL installation tutorial for Windows system do...

Common methods of Vue componentization: component value transfer and communication

Related knowledge points Passing values ​​from pa...

Solve the splicing problem of deleting conditions in myBatis

I just learned mybatis today and did some simple ...

Detailed explanation of common methods of JavaScript arrays

Table of contents Common array methods pop() unsh...

Vue implements the method example of tab routing switching component

Preface This article introduces the use of vue-ro...

JS implements the snake game

Table of contents 1. Initialization structure 2. ...

Introduction and analysis of three Binlog formats in MySQL

one. Mysql Binlog format introduction Mysql binlo...

An article explains Tomcat's class loading mechanism

Table of contents - Preface - - JVM Class Loader ...

js to achieve a simple magnifying glass effect

This article shares the specific code of js to ac...

How to Completely Clean Your Docker Data

Table of contents Prune regularly Mirror Eviction...

Bootstrap 3.0 study notes CSS related supplement

The main contents of this article are as follows:...

What is a MySQL index? Ask if you don't understand

Table of contents Overview From Binary Tree to B+...

Native js custom right-click menu

This article example shares the specific code of ...