Simple implementation of add, delete, modify, and query statements for Mysql
Simple implementation of add, delete, modify, and query statements for Mysql
Add record:
Insert into tablename (...) values (...) // If the added record contains all columns, you do not need to write the data list insert into tablename values (...)
Delete record:
Delete from tablename where condition;
Modification record:
Update tablename set xx = xx, xx = xx... where condition; alter table tablename set xx = xx, xx = xx... where condition;
Query records:
Select (...) from tablename where condition; select * from tablename where condition;
Delete the entire table:
Drop table tablename;
Add column:
Alter table tablename add column columnname columntype ...;
Delete column:
Alter table tablename drop column columnname;
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!