时间:2021-07-01 10:21:17 帮助过:9人阅读
mysql> desc card_info;
+-------------+-----------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-----------+------+-----+-------------------+-------+
| card_number | char(20) | NO | PRI | | |
| hit_time | int(11) | NO | | 0 | |
| modify_time | timestamp | NO | | CURRENT_TIMESTAMP | |
+-------------+-----------+------+-----+-------------------+-------+
card_number做insert条件时,值需要加单引号;
做update条件时,一个长度为15的值不加单引号才能实现,一个长度为19的值无论加不加单引号都无法实现更新