CHAR and VARCHAR types are searched case insensitively, unless you use the BINARY keyword. : Varchar « Data Type « SQL / MySQL






CHAR and VARCHAR types are searched case insensitively, unless you use the BINARY keyword.

     
mysql>
mysql> CREATE TABLE test5(first_name CHAR(10));
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql> INSERT INTO test5(first_name) VALUES ('Nkosi');
Query OK, 1 row affected (0.00 sec)

mysql>
mysql> SELECT first_name FROM test5 WHERE first_name='nkosi';
+------------+
| first_name |
+------------+
| Nkosi      |
+------------+
1 row in set (0.00 sec)

mysql>
mysql> drop table test5;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
    
  








Related examples in the same category

1.Define and use varchar
2.VARCHAR(n) character string with variable length, maximum 65,535 characters
3.Varchar type column with collate latin1_german1_ci
4.Not null varchar column
5.Nullable varchar column
6.Compare varchar value