Home > database >  Create a Mysql table in python USES the if not exists or complains
Create a Mysql table in python USES the if not exists or complains

Time:09-17

The create table if not exists student (name varchar (100) not null, nums char (1) primary key not null, the age int the not null, sex char (5) not null, depart varchar (100) not null, phone char (11));"

An error is: Warning (from warnings module) :
File "D: \ python \ lib \ site - packages \ pymysql \ your cursors py", line 170
Result=self. _query (query)
Warning: (1050, "the Table 'student' already exists")
  • Related