I am following the instructions of "SQL in 10 minutes" and encounter such a problem:
In its example "Using the In Operator"
SELECT prod_name, prod_price
FROM Products
WHERE vend_id IN ('DLL01','BRS01')
ORDER BY prod_name;
produced the result:
+---------------------+------------+
| prod_name | prod_price |
+---------------------+------------+
| 12 inch teddy bear | 8.99 |
| 18 inch teddy bear | 11.99 |
| 8 inch teddy bear | 5.99 |
| Bird bean bag toy | 3.49 |
| Fish bean bag toy | 3.49 |
| Rabbit bean bag toy | 3.49 |
| Raggedy Ann | 4.99 |
+---------------------+------------+
However, I tried with MySQL coming with the result:
MySQL [distributor]> select prod_name, prod_price from products where vend_id in ("DLL01", "BSR01") order by prod_name;
+---------------------+------------+
| prod_name | prod_price |
+---------------------+------------+
| Bird bean bag toy | 3.49 |
| Fish bean bag toy | 3.49 |
| Rabbit bean bag toy | 3.49 |
| Raggedy Ann | 4.99 |
+---------------------+------------+
I could retrieve the identical output if the ("DLL01", "BSR01")
was set as lowercase:
MySQL [distributor]> select prod_name, prod_price from products where vend_id in ("dll01", "brs01") order by prod_name;
+---------------------+------------+
| prod_name | prod_price |
+---------------------+------------+
| 12 inch teddy bear | 8.99 |
| 18 inch teddy bear | 11.99 |
| 8 inch teddy bear | 5.99 |
| Bird bean bag toy | 3.49 |
| Fish bean bag toy | 3.49 |
| Rabbit bean bag toy | 3.49 |
| Raggedy Ann | 4.99 |
+---------------------+------------+
7 rows in set (0.000 sec)
With my limited knowledge in SQL, it's hard to figure out Case-sensitive issue.