Distinct keyword reports 3065 error in MySQL

RocketBunny 2022-02-13 06:24:30 阅读数:587

distinct keyword reports error mysql

This is mysql5.7 edition ,DISTINCT And order by When used together, it will report 3065 error . because mysql5.7 The grammar of mysql5.6 The grammar is more strict , take DISTINCT And order by When used together, the two will be sorted .

Solution :

stay mysql Add to profile :

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

And then restart mysql Service can .

  from :http://www.rrzcms.com/newsinfo/138.html

copyright:author[RocketBunny],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130624283989.html