[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains 的問題 MySQL
這幾天學習mysql時遇到不少問題,其中一個就是查詢sql執行時會出現一個錯誤,但也有查詢結果,在百度之後發現了一個有效的解決方法,下面是報錯資訊:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
解決方案:
select version(),
@@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
之後再執行
show variables like "sql_mode";
set sql_mode='';
set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
然後再執行自己的sql就不會出現之前的錯誤了
相關文章
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated cExpressAI
- mysql主給備賦予許可權時報錯,MySQL [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clauseMySqlExpress
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggreExpressAI
- mysql報錯:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggreMySqlExpressAI
- list is not in GROUP BY clause and contains nonaggre的問題AI
- ocp 19c考題,科目082考試題(26) - order by clause
- ocp 19c考題,科目082考試題(27) - order by clause
- mysql order by 和 group by 順序問題MySql
- Oracle Model ClauseOracle
- DML_The OUTPUT Clause
- Oracle SQL Model ClauseOracleSQL
- 4.3.2.2.1 The SEED FILE_NAME_CONVERT Clause
- alter tablespace ts_name autoextend_clause
- MySQL5.7 group by新特性報錯1055的解決辦法MySql
- [905]MySQL的sql_mode解析與設定和MySQLdb._exceptions.OperationalError: (1055, “ExpressionMySqlExceptionErrorExpress
- You can‘t specify target table ‘Person‘ for update in FROM clause
- 配置Mysql Group Replication遇到的問題筆記MySql筆記
- MySql5.7及以上 ORDER BY 報錯問題MySql
- MySQL order by limit 分頁資料重複問題MySqlMIT
- laravel 解決 mysql only_full_group_by 問題LaravelMySql
- MyBatis order by失效問題MyBatis
- group by 使用的 as 同名問題!
- 文獻閱讀——Single Clause Assumption without Activation Literals to Speed-up IC3
- max() group by共用問題
- npm ERR! code ECONNRESET npm ERR! errno ECONNRESET網路問題解決NPM
- 解決laravel出現Syntax error or access violation: 1055 ‘***‘ isn‘t in GROUP BYLaravelError
- npm ERR! Error: CERT_UNTRUSTED的問題解決NPMErrorRust
- [20221123]19cDBA_EXPRESSION_STATISTICS查詢expression_text中字串帶雙引號的問題Express字串
- MySQL的GROUP_CONCAT函式輕鬆解決多表聯查的聚合問題MySql函式
- 深入淺出 MySQL 優先佇列(你一定會踩到的order by limit 問題)MySql佇列MIT
- group by 和 order by 一起使用,報錯 ORA-00979:不是 GROUP BY 表示式
- mysql order by 優化MySql優化
- MySQL 之 ORDER BY FIELDMySql
- MySQL:關於排序order by limit值不穩定的說明(1)MySql排序MIT
- java——ArrayList中contains()方法中的疑問JavaAI
- SQL中rownum和order by的執行順序的問題SQL
- mysql order by是怎麼工作的?MySql
- 解決mybatis出現Mapped Statements collection already contains value for問題MyBatisAPPAI