1. Error message
ERROR 1052 (23000): Column 'id' in field list is ambiguous
2. Cause analysis
Column ‘ID’ is repeated in the field list. In fact, two tables have the same field, but the name of the table field is not preceded by the name of the table, so the reference is unknown. The prefix student is no problem.
3. Solutions
SELECT student.name, student.student_id, score.score FROM student INNER JOIN score ONstudent.student_id = score.student_id WHERE student.name='mio';
+------+------------+-------+
| name | student_id | score |
+------+------------+-------+
| mio | 1 | 99 |
| mio | 1 | 77 |
| mio | 1 | 88 |
| mio | 1 | 99 |
+------+------------+-------+
4 rows in set (0.00 sec)
Follow my technical official account “Ramble on ARTIFICIAL Intelligence”, and push high-quality articles every day
Read More:
- MySQL error 1054 (42s22) unknown column ‘password’ in ‘field list’
- MySQL unknown column ‘in’ field list ‘solution
- MySQL ERROR 1054 (42S22): Unknown column’password’ in’field list’ error
- MySQL password setting error message: error 1054 (42s22): unknown column ‘password’ in ‘field list’
- Cause: java.sql.BatchUpdateException: Unknown column ‘xxx‘ in ‘field list‘
- Unknown column ‘Password‘ in ‘field list‘
- How to Fix SQL Error: 1054, SQLState: 42S22 Unknown column ‘markcardex0_.art_service_time’ in ‘field list’
- Error attempting to get column ‘xxxxx’ from result set — after Lombok is annotated with builder, mybatis cannot recognize the correct type of field
- Word column after the text evenly distributed in the left and right two columns, rather than fill in the left column and then fill in the right column, how to do?
- MySQL advanced — Explanation of ref field in explain information
- Solution of duplicate entry ‘value’ for key ‘field name’ in MySQL
- In the SQL query statement, add the column that does not exist in the table and set the fixed value of the column
- Mysql reports an error Operand should contain 1 column(s)
- Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
- MySQL error operation should contain 1 column (s)
- Unity2019.1.02f error cs0104: ‘minattribute’ is an ambiguous reference between
- When the mybatis field contains an expression, an error is reported when it is stored in the database
- Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and co
- R note for Bioinfo: the column for the select call is undefined