1、AND操作符:
select 表的字段名 from 对应的表名 where 表的字段名 AND 表的字段名 运算符 值;
例子:select prod_id,prod_price,prod_name from products where ven_id = 1003 AND prod_price <= 10;
2、OR操作符:
select 表的字段名 from 对应的表名 where 表的字段名 运算符 值 OR 表的字段名 运算符 值;
例子:select prod_name,prod_price from products where vend_id = 1002 OR vend_id = 1003;
3、计算次序(AND有优先权限)
select prod_name,prod_price from products where (vend_id = 1002 OR vend_id = 1003) AND prod_price >= 10;
4、IN操作符:
select prod_name,prod_price from products where vend_id IN (1002,1003) order by prod_name;
5、NOT操作符:
select prod_name,prod_price from products where vend_id NOT IN (1002,1003) order by prod_name;