Make a SELECT with multi tables
I have 3 tables and need something like this (is about food)
Orders
code (of the client)
product (is a code)
amount
Clients
code (of the client of course)
name
Products
product (is a code)
name
description
I need to obtain the name of the client, the name of the product in base of the order, and need at same time to obtain the amount of the order
Something like :
Name of Client - Name of the prduct - Amount
I have this but it only return 1 (and to test i have 2)
SELECT clientes.nombre, productos.nombre, ordenes.cantidad FROM Clientes, Productos, Ordenes WHERE clientes.codigo=ordenes.codigo AND productos.codigo=ordenes.producto
Subject
Written By
Posted
Make a SELECT with multi tables
June 12, 2005 08:47PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.