Home Database Mysql Tutorial delete from表名&truncate table表名区别

delete from表名&truncate table表名区别

Jun 07, 2016 pm 02:53 PM
amp delete from truncate Table Name

delete from表名truncate table表名区别 1.delete不能使自动编号返回为起始值。 但是truncate能使自动增长的列的值返回为默认的种子 2.truncate只能一次清空,不能按条件删除。 www.2cto.com 但是delete可以按条件清除部分记录。 3.truncate清空数据表性能(


delete from表名&truncate table表名区别

 

1.delete不能使自动编号返回为起始值。

 

但是truncate能使自动增长的列的值返回为默认的种子

 

2.truncate只能一次清空,不能按条件删除。

  www.2cto.com  

但是delete可以按条件清除部分记录。

 

3.truncate清空数据表性能(速度)比delete快。

 

4.truncate不会记录到系统日志,不会触发delete触发器。
 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the delete key on the keyboard? What is the delete key on the keyboard? Mar 16, 2023 pm 04:48 PM

There are two keyboard delete keys: del (delete) key and backspace key. Backspace is also called the backspace key. This key can delete the text content in front of the cursor; and the delete key can delete characters, files and selected objects. Each time you press the del key, a character to the right of the cursor will be deleted, and the character to the right of the cursor will move one frame to the left; when one or more files/folders are selected, press the Del key to quickly delete; in some applications Select an object in the program and press the Del key to quickly delete the selected object.

What is the function of delete key What is the function of delete key Mar 10, 2023 pm 06:07 PM

The functions of the delete key are: 1. Delete characters; each time the delete key is pressed, a character to the right of the cursor will be deleted, and the character to the right of the cursor will move one frame to the left. 2. Delete files; when one or more files/folders are selected, press the Delete key to quickly delete them (move to the Recycle Bin for recovery). 3. Delete the selected object; select an object in some applications and press the Delete key to quickly delete the selected object.

How to Control + Alt + Delete: Mac Tutorial How to Control + Alt + Delete: Mac Tutorial Apr 16, 2023 pm 12:37 PM

Control+Alt+Delete: "Mac" mode Ctrlaltdel is a common key combination used by Windows users to open Task Manager. They usually exit unwanted applications from the manager menu to free up some space on their computer. The Control+Alt+Delete Mac variant lets you open the Force Quit menu. If Mac users want to quit the program causing the problem or view open programs, they can interact with the menu to investigate further. How to perform ControlAltDelete on Mac? If you have any malfunctioning applications, you must use this key combination to

Can deleted files be recovered? Can deleted files be recovered? Feb 24, 2023 pm 03:49 PM

Files deleted by delete can be recovered; because when users use delete to delete files, these files will be moved to the recycle bin and are not completely deleted. Recovery method: 1. Open the "Recycle Bin", select the file you want to restore, and click "Restore this item"; 2. Open the "Recycle Bin", select the file you want to restore, and use the undo shortcut "ctrl+z". Can.

How to use PUT and Delete requests in SpringBoot How to use PUT and Delete requests in SpringBoot May 13, 2023 pm 12:16 PM

PUT and Delete requests are used in the Form form and only support get and post methods. In order to implement the put method, we can implement it through the following three steps: 1) Configure HiddenHttpMethodFilter in SpringMVC 2) Create a post form on the page 3) Create an input item, name ="_method", the value is the specified request method. Get the value of "_method" in the HiddenHttpMethodFilter class to get the new request method. The th tag is the thymeleaf template, which means that only when employee

What coin is AMP? What coin is AMP? Feb 24, 2024 pm 09:16 PM

What is AMP Coin? The AMP token was created by the Synereo team in 2015 as the main trading currency of the Synereo platform. AMP token aims to provide users with a better digital economic experience through multiple functions and uses. Purpose of AMP Token The AMP Token has multiple roles and functions in the Synereo platform. First, as part of the platform’s cryptocurrency reward system, users are able to earn AMP rewards by sharing and promoting content, a mechanism that encourages users to participate more actively in the platform’s activities. AMP tokens can also be used to promote and distribute content on the Synereo platform. Users can increase the visibility of their content on the platform by using AMP tokens to attract more viewers to view and share

How to add, edit and delete table rows in jQuery? How to add, edit and delete table rows in jQuery? Sep 05, 2023 pm 09:49 PM

In today's era of web development, effective and efficient table management has become very important, especially when dealing with data-heavy web applications. The ability to dynamically add, edit, and delete rows from a table can significantly enhance the user experience and make applications more interactive. An effective way to achieve this is to leverage the power of jQuery. jQuery provides many features to help developers perform operations. Table rows A table row is a collection of interrelated data, represented by elements in HTML. It is used to group together cells (represented by elements) in a table. Each element is used to define a row in the table, and for multi-attribute tables, it usually contains one or more elements. Syntax$(selector).append(co

You can't specify target table 'table_name' for update in FROM clause - How to solve MySQL error: Unable to update target table in FROM clause You can't specify target table 'table_name' for update in FROM clause - How to solve MySQL error: Unable to update target table in FROM clause Oct 05, 2023 am 10:25 AM

Hello, the following is an article within 1500 words, titled: Youcan'tspecifytargettable'table_name'forupdateinFROMclause-How to solve the MySQL error: Unable to update the target table in the FROM clause, specific code examples are needed. During the development of MySQL database, we sometimes encounter the following error message: Youcan'tspecify

See all articles