2
Below follows the structure and relationships of my database.
I tried to use the code :
`SELECT `cliente`.`Nome`, `produto`.`Descricao`,
`contem`.`QuantItem`
FROM `cliente`, `produto`, `contem`
INNER JOIN `pedido`
ON `cliente`.`Codigo` = `pedido`.`Codigo`
INNER JOIN `contem`
ON `contem`.`numero` = `pedido`.`Numero`
WHERE `contem`.`Codigo` = 1;`
but it presents the following error when executing: #1066 - Table/alias contains not only.
I would like to know how I can correct and/or what I must do to show the desired result.
I thank you in advance for your cooperation.
@Caiqueromero but if he wants to get content from the other two tables (product.Description, contains.Quantitem) how he will look only at one table?
– R.Santos
@R.Santos unfortunately correcting this, still continues the same error.
– Neto Miranda
@Caiqueromero, cara I tried what you suggested, but presented the following error: #1054 - Product column. Unknown 'description' in 'field list', I believe it must be necessary that they remain in the declaration.
– Neto Miranda
I wrote wrong take only the contents that are in the FROM, let me know if it works
– Caique Romero