Hi,
Is it possible with SQL to create 1 query from 2 tables?
Table1 and Table2 have a few corresponding columns but mostly different
ones. Now I need 2 of these columns and get them in a query. Can I get the
values from table in there together with table? The tables have the same
column.
How can this be done?
Thanks
JorisJoris De Groote,
Please, provide tabls schema, sample data and expected results.
Please provide DDL and sample data.
http://www.aspfaq.com/etiquette.asp?id=5006
AMB
"Joris De Groote" wrote:
> Hi,
> Is it possible with SQL to create 1 query from 2 tables?
> Table1 and Table2 have a few corresponding columns but mostly different
> ones. Now I need 2 of these columns and get them in a query. Can I get the
> values from table in there together with table? The tables have the same
> column.
> How can this be done?
> Thanks
> Joris
>
>|||Joris De Groote wrote:
> Hi,
> Is it possible with SQL to create 1 query from 2 tables?
> Table1 and Table2 have a few corresponding columns but mostly different
> ones. Now I need 2 of these columns and get them in a query. Can I get the
> values from table in there together with table? The tables have the same
> column.
> How can this be done?
> Thanks
> Joris
Begin by referring to Books Online, look up the SELECT statement, in
particular the JOIN clause.|||Check out these links and read up on SQL a bit...
http://www.w3schools.com/sql/sql_intro.asp
http://sqlzoo.net/
"Joris De Groote" <joris.degroote@.skynet.be> wrote in message
news:u$f9iUWiGHA.4144@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Is it possible with SQL to create 1 query from 2 tables?
> Table1 and Table2 have a few corresponding columns but mostly different
> ones. Now I need 2 of these columns and get them in a query. Can I get the
> values from table in there together with table? The tables have the same
> column.
> How can this be done?
> Thanks
> Joris
>
Monday, March 12, 2012
Make 1 query from 2 tables
Labels:
columns,
corresponding,
create,
database,
differentones,
microsoft,
mysql,
oracle,
query,
server,
sql,
table2,
tables,
tablestable1
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment