-2

I have two tables called customers and wantslist. I want to join the columns customername, customeraddress , creditlimit , bytitle and byauthor.

How can I write a query that can show those column together in a table?

The first table is customers. It has the columns customeraddress , customername and creditlimit.

The second table is wantslist. It has the columns bytitle and byauthor.

How can I write a query that can join those 5 columns into 1 table?

2 Answers2

1

Without knowing your specific strucutre you would use a SQL query similar to...

SELECT c.customername, c.customeraddress, c.creditlimit, w.bytitle, w. byauthor
FROM customers as c
JOIN wantslist as w on c.customerid = w.customerid
Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
0
SELECT customers.customername, customers.customeraddress, customer.creditlimit, wantslist.bytitle, wantslist.byauthor
FROM wantslist
INNER JOIN customers
ON *{your matching condition}*;
Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
Anan Srivastava
  • 112
  • 1
  • 9