Home > Database > Mysql Tutorial > Detailed explanation of data in query table name

Detailed explanation of data in query table name

零下一度
Release: 2017-07-24 09:16:54
Original
1492 people have browsed it

1. Query all the data in table namedata

##SELECT * FROM table name;

2. Insert data

INSERT INTO table name VALUES(1,' ',..);


// varchar ---> ' '
//Insert must be all elements

## INSERT INTO table name (ID,NAME) VALUES(1,'A');

//Specified element (data) corresponds to (data)

3. Update data

UPDATE table name SET column name 1 = column value 1, column name 1 = column value 1,....

[WHERE Control condition];


//If you don’t add the where condition, all column values ​​will change
//<>Not equal to, IS NULL, BETWEEN...AND
//OR <-->IN

##4.Delete data

DELETE FROM table name

[WHERE condition];

//If you do not add the where condition, all data in the table will be deleted

##//TRUNCATE TABLE table name: Delete all records

The above is the detailed content of Detailed explanation of data in query table name. 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