zhiqingstudy

Be a young person with knowledge and content

1. Query Data

Statement format: select * from table name;

Example:

select * from member;

Query the specified column statement format: select column 1, column 2,... from table name;

Example:

select id,name from member;

2. Add Data

Statement format of adding data to the whole column: insert into table name values (...);

Example:

Insert into member values (0, 'Zhang San', 25, 'male');

Some columns add data statement format: insert into table name (column 1,...) values (value 1,...);

Example:

Insert into member (name, age) values ('Zhang San ', 26);

Full column multi row insertion syntax: insert into table name values (value 1,...), (value 1,...);

Example:

Insert into member values (0, 'Zhang San', 26, 'male'), (1, 'Li Si', 26, 'female'), (2, 'Zhang San', 24, 'male');

Syntax for multi row insertion of partial columns: insert into table name (column 1,...) values (value 1,...), (value 1,...);

Example:

Insert into member (name, age) values ('Wang Wu ', 22), ('Zhao Liu', 21);

3. Modify Data

语法格式:update 表名 set 列1=值1,列2=值2,… where 条件;

Example:

update member set age=18,gender=’女’ where id=4;

4. Delete Data

Syntax format: delete from table name where condition;

Example:

delete from member where id=2;

comment
head sculpture
Code:
Related

Why you shouldn't stay at a job for more than 2 years?

3 harsh facts long-distance relationships

how to keep your girlfriend interested in a long-distance relationship




Unless otherwise specified, all content on this website is original. If the reprinted content infringes on your rights, please contact the administrator to delete it
Contact Email:2380712278@qq.com

Filing number:皖ICP备19012824号