标签:排序 pre set 方向 列排序 sql cts href 过滤
目录
select prod_name from Products;select prod_id,prod_name,prod_price from Products;select * from Products;select distinct prod_name from Products;select prod_name from Products
limit 5 offset 4;select prod_name from Products
limit 4,5;select prod_id,prod_name,prod_price from Products; -- 这是一条注释select prod_name from Products
order by prod_name;select prod_id,prod_name,prod_price from Products
order by prod_price,prod_name;select prod_id,prod_name,prod_price from Products
order by 2,3;select prod_id,prod_name,prod_price from Products
order by prod_price,prod_name;select prod_id,prod_name,prod_price from Products
order by prod_price desc,prod_name;select prod_id,prod_name,prod_price from Products
order by prod_price desc,prod_name desc;select prod_id,prod_name,prod_price from Products
where prod_price = 3.49;
=                                         (等于)
<>                                       (不等于)
!=                                        (不等于)
<                                         (小于)
<=                                       (小于等于)
!<                                        (不小于)
>                                         (大于)
>=                                       (大于等于)
!>                                        (不大于)
BETWEEN                         (在指定两个值之间)
IS NULL                              (为null值)
select prod_id,prod_name,prod_price from Products
where prod_price < 10;select prod_id,prod_name,prod_price from Products
where vend_id <> 'DLL01';select prod_id,prod_name,prod_price from Products
where prod_price between 5 and 10;select prod_id,prod_name,prod_price from Products
where prod_price IS NULL;select prod_id,prod_name,prod_price from Products
where prod_price < 10 and prod_price > 5;select prod_id,prod_name,prod_price from Products
where prod_price = 10 or prod_price  = 5;select prod_id,prod_name,prod_price from Products
where prod_price > 10 or prod_price < 5 and vend_id = 'DDL01';select prod_id,prod_name,prod_price from Products
where (prod_price > 10 or prod_price < 5) 
        and vend_id = ' DDL01 ';select prod_id,prod_name,prod_price from Products
where prod_price in (5,10,20);select prod_id,prod_name,prod_price from Products
where NOT vend_id  =  'DLL01';select prod_id,prod_name,prod_price from Products
where vend_id <> 'DLL01';标签:排序 pre set 方向 列排序 sql cts href 过滤
原文地址:https://www.cnblogs.com/Mario-mj/p/11443227.html