집 >데이터 베이스 >MySQL 튜토리얼 >mysql操作时遇到的小问题_MySQL
mysql数据库在程序中执行sql语句时,或者在执行sql时,数据库表可能会有一些特殊的字符,比如说#,.等,这样在执行时
可能会遇到问题如以下的表名,backup_2014.2.22, 这个表在查询时会有问题因为存在这个.的缘故,会报错table_name=“backup_2014.2.22"如python中写self.db.query("show create table %s" % table_name)[0]会报错(1064, "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 '.22' at line 1”)Traceback (most recent call last): File "/Users/xuxiaodong/work/db_table_to_Wiki.py", line 120, in