1. sql insert syntax
1. Use insert to insert a single row of data
Syntax : insert [into] <table name> [column name] values <column value>
Example: insert into Strdents (name, gender, date of birth) values ('bin','male',' 1993/6/15')
Note: into can be omitted; column names and column values are separated by commas; column values are enclosed in single quotes; if the table name is omitted, all columns will be inserted in turn
Second, sql delete syntax
1. Use delete to delete some data
Syntax : delete from <table name> [where <deletion condition>]
Example: delete from a where name='bin' (delete the row whose column value is "bin" in table a)
Note : Deleting the entire row is not deleting a single field, so the field name cannot appear after delete
Note : When deleting data, be sure to add the where condition
Three, sql insert data
1. Use update to update and modify data
Syntax : update <table name> set <column name=update value> [where <update condition>]
Example: update tongxunlu set age=18 where name='blue nickname'
Note: after set It can follow the update values of multiple data columns, separated by commas; the where clause is optional and used to restrict conditions. If not selected, all rows of the entire table will be updated.
Four, sql query statement
1. Common query
Syntax : select <column name> from <table name> [where <query condition expression test>] [order by <sorted column name>[asc or desc]]