重点:所有语句都要以分号‘;’结尾。
1、模糊查询:%like%
写法:select * from 表格 where 字段 like ‘%查询内容%’ ;
例子:模糊查询包含‘emily’的内容。
2、in/not in():不固定的,不连贯的查询
in():在这个集合里面(下图)
not in():不在这个集合
写法:select * from 表格 where 字段 in/not in();
例子:查询ID为集合(45.47.50)的数据
3、连接查询
重点:所有语句都要以分号‘;’结尾。
1、模糊查询:%like%
写法:select * from 表格 where 字段 like ‘%查询内容%’ ;
例子:模糊查询包含‘emily’的内容。
2、in/not in():不固定的,不连贯的查询
in():在这个集合里面(下图)
not in():不在这个集合
写法:select * from 表格 where 字段 in/not in();
例子:查询ID为集合(45.47.50)的数据
3、连接查询