承接国内外服务器租用托管、定制开发、网站代运营、网站seo优化托管接单、网站代更新,新老站点皆可!!咨询QQ:3787320601

索引:python如何建立mysql数据库索引

管理员 2023-03-29 08:49:31 互联网圈 56 ℃ 0 评论 1225字 收藏

python如何建立mysql数据库索引

python怎么建立mysql数据库索引

使用python建立mysql数据库索引的方法

1.创建主键索引

方法一:

create table biao (

id int auto_increment primary key

)

方法二:

create table b (

id int auto_increment,

    primary key(id)

)

2.创建普通索引

方法一:

create table t3(

id int auto_increment primary key,

    name varchar(32) not null default '',

    index u_name(name)

)charset=utf8;

方法二:

create index ix_name on biao(name);

文章来源:丸子建站

文章标题:索引:python如何建立mysql数据库索引

https://www.wanzijz.com/view/5266.html

相关文章

Related articles

X

截屏,微信识别二维码

微信号:weimawl

(点击微信号复制,添加好友)

打开微信