本文介绍了索引表中的mysql更新查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一张表有主键组合,我都为该表做了索引。



EX:TableName - > StudentMark



Primay Key - > ClassName,RollNo(两者都是我设定的索引)





现在我在做查询



更新StudentMark set name =''XXX''其中ClassName =X且RollNo = 1



更新StudentMark set name =''XXX ''其中RollNo = 1且ClassName =X



查询是否合适。因为我做了索引类名,rollno。

One of my table having combintaion of primary key, both i did index for that table.

EX: TableName -> StudentMark

Primay Key -> ClassName, RollNo (Both are i set index)


Now i am doing the query

Update StudentMark set name =''XXX'' where ClassName ="X" and RollNo = 1

Update StudentMark set name =''XXX'' where RollNo = 1 and ClassName ="X"

which query is proper. because i did the index classname, rollno.

推荐答案


这篇关于索引表中的mysql更新查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 11:00