Home  >  Article  >  Database  >  Detailed explanation of database update usage

Detailed explanation of database update usage

hzc
hzcOriginal
2020-06-18 15:42:1140888browse

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!

Statement:
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