MySQL必知必会(Select, Where子句)
SELECT prod_name, prod_price FROM products WHERE prod_price = 2.5; SELECT prod_name, prod_price FROM products WHERE prod_name = 'fuses'; #默认不区分大小写 SELECT prod_name, prod_price FROM products WHERE prod_price < 10; SELECT prod_name, prod_price FROM products WHERE prod_price <= 10; SELECT vend_id, prod_name FROM products WHERE vend_id <> 1003; SELECT prod_name, prod_price FROM products WHERE prod_price BETWEEN 5 AND 10; SELECT cust_id FROM customers WHERE cust_email IS NULL; #NULL 表示 无值(no value)