Skip to main content
0 online
theremin Mar 19, 2004

I did all the ones I could, but had trouble coming up with like the last 6 of the SQL statements required. So, I put what the database looks like, and the problems I couldn't figure out into Word....

iwz Mar 19, 2004

Ok, well for #2 on that page.. you basically want to join the REP and CUSTOMER tables on the REP_NUM column, and also CUSTOMER.CREDIT_LIMIT = '$10,000.00'. Then just add in the DISTINCT keyword ...

deanh77 Mar 22, 2004

or you could do an inner join.

iwz Mar 22, 2004

how would you write that?

deanh77 Mar 22, 2004

well.. a select with a WHERE clause that matches two columns from different tables IS an INNER JOIN (by definition). you can use the following syntax if you like. SELECT DISTINCT(REP_NUM, LAS...

theremin thereminOG 2002

Good to know. Thanks. I haven't tried INNER JOINs yet, because I didn't understand them, but now I do, a little better.

deanh77 deanh77Founder

in case I wasn't clear enough:

SELECT col1, col2 FROM table1, table2 WHERE table1.col3 = table2.col9

is an inner join.

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.

💎

Gems

Spot something you love — a legendary comment, a classic thread, a great photo? Log in and click the diamond icon to mark it as a Gem. Add a note about why it's special. The best stuff surfaces on the Gems page.