+ 1
Is that possible to select two table data in one sql query
3 Answers
0
yes, Using inner join
example:
client(c_id,name,lastname)
company(cmp_id,c_id,name)
1)selecting client name & company name
SELECT client.name,company.name
FROM client INNER JOIN company
ON client.c_id =company.c_id
WHERE...(if theres condition)
note:
on -> primary key = primary key
0
u can get two tables information in a single query without using inner join also
eg: select client.name , company.name from customers, company where client.c_id = company.c_id (<and> extra conditions )
0
Oracle use
select a.column_name , b.column_name
from company a , client b
where....