Home > Database > SQL > body text

Detailed explanation of database update usage

hzc
Release: 2020-06-18 15:42:11
Original
40874 people have browsed it

Detailed explanation of database update usage

Detailed explanation of the usage of database update

Update is a database SQL syntax term. It is used to update the original data in the table. When used alone, use where matching field.

The syntax is: UPDATE table name SET column name = new value WHERE column name = some value

For example: Update table_name Set column_name = new_value Where column_name = some_value

Detailed explanation of database update usage

Extended information

Notes on using update:

1. sp_updatestats can update statistical information to the latest.

2. Low memory will cause query plans that are not connected by the client to be cleared.

3. Modify the table structure. After modifying the index, the query plan will be cleared. You can run the query several times after modifying it.

4. When using update, order by will affect the query speed. Using a function in where will call the filter for scanning. Scanning the table should be avoided as much as possible.

Recommended tutorial: "sql tutorial"

The above is the detailed content of Detailed explanation of database update usage. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!