标签:creat exe mysql tor localhost min 创建 cmd ase
import mysql.connector conn= mysql.connector.Connect( host=‘localhost‘, user=‘root‘, passwd=‘admin‘, database=‘testcode‘ ) print(‘1.‘,conn) cmd = conn.cursor() # 光标行 cmd.execute(‘‘‘create table test( id int primary key auto_increment, sname char(10) not null, age int);‘‘‘)
mysql.connector-创建数据库表test(id, sname, age)其中id为主键自增,sname不能为空
标签:creat exe mysql tor localhost min 创建 cmd ase
原文地址:https://www.cnblogs.com/cy-zjs/p/13509514.html