前期回顾
(?表示根据自己实际情况进行填写)
- 查询
select * from ?;
- 添加
insert into ? values(?);
insert into ? (?) values (?);
- 修改
update ? set name = ? where ?;
- 删除
delete from ? where ?;
delete from ?;
- 条件编写
1.where 关键字后面跟的便是查询条件,多个查询条件如果需要同时满足则用 and 连接,满足一个则用 or 连接,否定则是 not;
select * from ? where ? and ?;
select * from ? where ? or ?;
select * from ? where not ? ;
2.字母表排序查询,也可以用大于小于号,如name>’a’;
select * from ? where ? > ?;
- 查询列自定义
1.select关键字后面的*,表示查询表中的所有列