Monty Taylor wrote:
Well... I don't know if I consider it to be an error myself, but I can
see where you are coming from in this case.
Here is another example where it creates an inconsistent error IMO in
the case of the IN clause. People not familiar with C strings would be
really confused by this.
--------------------
mysql> create table test2 (id int, field varchar(10) );
Query OK, 0 rows affected (0.03 sec)
mysql> insert into test2 values (1, "foo");
Query OK, 1 row affected (0.00 sec)
mysql> insert into test2 values (2, "bar");
Query OK, 1 row affected (0.00 sec)
mysql> select * from test2 where field in ("foo" "bar");
Empty set (0.00 sec)
mysql> select * from test2 where field in ("foo", "bar");
+------+-------+
| id | field |
+------+-------+
| 1 | foo |
| 2 | bar |
+------+-------+
2 rows in set (0.00 sec)
mysql> select * from test2 where id in (1, 2);
+------+-------+
| id | field |
+------+-------+
| 1 | foo |
| 2 | bar |
+------+-------+
2 rows in set (0.00 sec)
mysql> select * from test2 where id in (1 2);
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '2)' at line 1
--
Brian Moon
Senior Web Engineer
------------------------------
When you care enough to spend the very least.
http://dealnews.com/
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp