well what happens is that I have a problem to consult a table, I have the typical products and category table where id_categoria
the attribute that relates the tables would be
- what I can't do is bring me EVERYTHING from the products table
I don't know if it's because the tables are related
SELECT * FROM productos
and it doesn't work for me
I try to do the select
without the attribute id_categoria
and it works but I need the query with that value
Thank you very much for your help
here several queries with only two tables where I have id_categoria in the products table:
fetch all the attributes of all the records of the products table:
fetch all products related to a certain category:
fetch product names filtered by category name:
This can happen if you don't use aliases in the
joins
. because it can be a problem to return two columns with the same name.This is how it should work.