sql statement record

When working on very large tables, you may occasionally need to run many queries to get a small subset of a large amount of data. Instead of running these queries against the entire table, let MySQL find the few records it needs at a time, putting It may be faster to select records into a temporary table and then run the query on those tables.

Creating a temporary table is easy by adding the TEMPORARY keyword to the normal CREATE TABLE statement:

CREATE TEMPORARY TABLE tmp_table (
 name VARCHAR(10) NOT NULL,
 value INTEGER NOT NULL
)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325768074&siteId=291194637