MySQL Forums
Forum List  »  General

Re: set column type - case sensitive
Posted by: Tony Groves
Date: January 13, 2005 06:08PM

Here's what I get with exactly the same code:
[tt]
mysql> CREATE TABLE t
-> (
-> mycharcol CHAR(1),
-> mysetcol SET("a","A","b","B","c","C") BINARY
-> );
Query OK, 0 rows affected, 3 warnings (0.03 sec)

mysql> INSERT INTO t (mycharcol,mysetcol)
-> VALUES ("a","a"),("b","b"),("c","c"),("A","A"),("B","B"),("C","C");
Query OK, 6 rows affected (0.00 sec)
Records: 6 Duplicates: 0 Warnings: 0

mysql> SELECT *
-> FROM t;
+-----------+----------+
| mycharcol | mysetcol |
+-----------+----------+
| a | a |
| b | b |
| c | c |
| A | a |
| B | b |
| C | c |
+-----------+----------+
6 rows in set (0.00 sec)

mysql> select * from t where mysetcol in ('a','b','c');
+-----------+----------+
| mycharcol | mysetcol |
+-----------+----------+
| a | a |
| b | b |
| c | c |
| A | a |
| B | b |
| C | c |
+-----------+----------+
6 rows in set (0.00 sec)

mysql> select * from t where mysetcol in ('A','B','C');
Empty set (0.00 sec)

mysql> show variables like 'version';
+---------------+----------+
| Variable_name | Value |
+---------------+----------+
| version | 4.1.7-nt |
+---------------+----------+
1 row in set (0.00 sec)
[/tt]

Options: ReplyQuote


Subject
Written By
Posted
Re: set column type - case sensitive
January 13, 2005 06:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.