代码:
execute('''
CREATE TABLE `<span style="font-family: Arial, Helvetica, sans-serif;">showcode</span><span style="font-family: Arial, Helvetica, sans-serif;">`.`code` (</span>
`id` INT NOT NULL AUTO_INCREMENT,
`code` VARCHAR(10) NOT NULL,
PRIMARY KEY(`id`));
''')
出现问题是:在执行的时候出现:mysql.connector.errors.ProgrammingError: 1064 (42000): 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 ''showcade'.'code'('id' INT NOT NULL AUTO_INCREMENT,' at line 1
#因为这里用到了多重引号,所以里面的单引号就要用转义字符`,在横数字键1左边这个按键。