[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
- mysql order by 和 group by 順序問題MySql
- Oracle Model ClauseOracle
- About Oracle WITH clauseOracle
- ANALYZE INDEX clauseIndex
- Oracle SQL Model ClauseOracleSQL
- mysql的order by和group byMySql
- Mysql update in報錯 [Err] 1093 - You can't specify target table 'company_info' for update in FROM clauseMySql
- ALTER SESSION ADVISE ClauseSession
- ALTER SYSTEM DISCONNECT SESSION ClauseSession
- UNRECOVERABLE DATAFILE clause in the ALTER DATABASE CLEAR LOGFILE statementDatabase
- You can‘t specify target table ‘Person‘ for update in FROM clause
- ORA-01788: CONNECT BY clause required in this query blockUIBloC
- 建立Materialized view log時是否使用sequence clause的差別ZedView
- MySQL5.7 group by新特性報錯1055的解決辦法MySql
- [905]MySQL的sql_mode解析與設定和MySQLdb._exceptions.OperationalError: (1055, “ExpressionMySqlExceptionErrorExpress
- MS-SQL 錯誤: The offset specified in a OFFSET clause may not be negativeSQL
- 配置Mysql Group Replication遇到的問題筆記MySql筆記
- MySql5.7及以上 ORDER BY 報錯問題MySql
- [Developer] ORA-00979:not a group by expressionDeveloperExpress
- msql查詢中報錯 Unknown column '黃色水果' in 'where clause'SQL
- ORA-01788: CONNECT BY clause required in this query block For ORACLE 10GUIBloCOracle 10g
- MySQL order by limit 分頁資料重複問題MySqlMIT
- 【MySQL】order by 結果不準確的問題及解決MySql
- laravel 解決 mysql only_full_group_by 問題LaravelMySql
- MyBatis order by失效問題MyBatis
- 【WITH Clause】使用WITH子句提高查詢統計效率-顛覆思維定勢
- group by 排序問題排序
- ORA-17500 ODM err的問題排查
- mysql 5.7sql_mode=only_full_group_by問題MySql
- ibatis Order By注入問題BAT
- 文獻閱讀——Single Clause Assumption without Activation Literals to Speed-up IC3
- 解決laravel出現Syntax error or access violation: 1055 ‘***‘ isn‘t in GROUP BYLaravelError
- 再看ibatis Order By注入問題BAT