Java
The date indicated by the previous write Java code is YYYY-MM-DD hh: mm: SS
Mm (uppercase for month) and mm (lowercase for minutes)
SQL
But in SQL, the situation is completely different.
(Cause: the reason is that SQL statements are case-insensitive, so both mm and mm cannot be used, and the month should be defined as Mi)
We want to write the YYYY-MM-DD hh: MI: SS, using mi to represent minutes.
To_date ('1970-01-01 13:14:20 ', 'yyyy-mm-dd hh24: MI: ss ')
Bytes -----------------------------------------------------------------------------------------------
Description of the Case sensitivity issue, which leadsProofreading rules
Fuzzy search and normal query:
Mysql> select * From collage where coll_name like 'a % ';
+ --------- + ----------- +
| Coll_id | coll_name |
+ --------- + ----------- +
| 8 | AA |
| 9 | AA |
+ --------- + ----------- +
2 rows in SET (0.00 Sec)
Mysql> select * From collage where coll_name = 'a ';
+ --------- + ----------- +
| Coll_id | coll_name |
+ --------- + ----------- +
| 8 | AA |
| 9 | AA |
+ --------- + ----------- +
2 rows in SET (0.01 Sec)
No problem during data insertion :
Insert into collage values ('8', 'A ');
Insert into collage values ('9', 'A ');
Case sensitivity
Select * from a where a = 'abcde' collate chinese_prc_cs_ai -- case sensitive
Select * from a where a = 'abcde' collate chinese_prc_ci_ai -- case insensitive
Select * From collage where coll_name like 'a % 'collate gbk_bin; this isMySQLOfProofreading rules.
Mysql> select * From collage where coll_name like 'a %'Collate gbk_bin;
+ --------- + ----------- +
| Coll_id | coll_name |
+ --------- + ----------- +
| 8 | AA |
+ --------- + ----------- +
For UTF-8
utf8_bin
You can specify rules when creating a table.
Create Table T1 (...)
Default Character Set Latin1Collate latin1_danish_ci;
For this table
Create Table Collage
(
Coll_id int not null auto_increment primary key,
Coll_name varchar (30) not null
) Engine = MyISAM
Default Character Set GBKCollateGbk_bin;
Zero network y9', jq wj p) j