mercredi 20 juillet 2016

how mysql deal with different type convert when using where clause

for example there is a type varchar(50) named by cardNo in table "bankcard",and it has a record,value is 6228480329288486759 when i query it as follows

SELECT id,cardNo  FROM BANKCARD WHERE cardNo = 6228480329288486000

it will find the record "6228480329288486759"

however,use clause like this

SELECT id,cardNo  FROM BANKCARD WHERE cardNo = "6228480329288486000"

the result dose not exist

i wonder how mysql deal with the the different type,convert numeric type to varchar

Aucun commentaire:

Enregistrer un commentaire