mysql add, delete and modify records in the table

1. Add (insert)
to add a record (a row ) to the table
insert into 表名[( 列名1, 列名2,…)] values ​​( 属性值1, 属性值2,…)[, ( 属性值1, 属性值2,…),…];
2. Change (update) to
modify the table Existing record
update 表名set 属性名1= the value 属性名2to be modified , = the value to be modified... where mark the column to be changed
3. delete (delete)
delete the table or record
delete from 表名where mark the record to be deleted;
do not write where It means to delete all the contents in the table, and this is not recommended.
Use truncate table 表名to clear the table, so that the value that is incremented will be cleared to 0

Guess you like

Origin blog.csdn.net/kitahiragawa/article/details/111597903