SQL Query Help
I have a database with multiple tables. I can easily run a select query to show me the contents of one table.
I'm trying to figure out how to run a query on TWO tables to only show me certain columns. Both tables have a primary key, but their not associated or linked or anythign - just two standalone tables. How can I write the sql statement to get two tables and only certain columns in each table to just display?
Thanks all.
[455 byte] By [
steve02a] at [2007-11-19 19:41:32]

# 1 Re: SQL Query Help
What is the schema of the two tables?
If there is no relation between the two tables - then you will not able to put the conditions on which you want the data from both of them. In this case, what results is called a cartesian resultset. You will get N records of table B for every record of table A. That resultset is meaningless. You should fire two seperate queries to work on those resultsets or else fine a condition to JOIN them. Regards.