Column ' ID ' in the field list is ambiguous
This error, because you have the ID field in the query statement, there is no description of which table ID field, should be added table name (or alias) to distinguish.
Examples of distinguishing with table names:
Select Student.id, Student.name, Score.total
From student, score
where student.id = Score.id
Examples of using aliases:
Examples of distinguishing with table names:
Select S.id, S.name, C.total
From student S, score C
where s.id = C.id
Many textbooks are used in a large number of aliases, in fact, for beginners, I suggest you understand the alias on the line, write their own time with a table name good
Add: Left function argument must be a field, the field is completed in the form of a table name, left before the table name will be grammatically incorrect, it should be this way:
Select Left (student.name, 10) ...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.