Thread View: be.comp.programming
3 messages
3 total messages
Started by YuGo
Thu, 23 Jan 2003 13:44
[SQL] Tabellen combineren
Author: YuGo
Date: Thu, 23 Jan 2003 13:44
Date: Thu, 23 Jan 2003 13:44
7 lines
1337 bytes
1337 bytes
Ik heb twee tabellen met de kolommen omschrijving en stuks, en ik zou die met een sql commando moeten kunnen weergeven in 1 query. Als ik select * from tabel1, tabel2 doe dan komen de kolommen naast elkaar, maar het is de bedoeling dat ik 2 kolommen heb met de rijen uit de twee tabellen. Wie weet hier een oplossing voor? Davy
Re: [SQL] Tabellen combineren
Author: Roel Schroeven
Date: Thu, 23 Jan 2003 13:53
Date: Thu, 23 Jan 2003 13:53
22 lines
1838 bytes
1838 bytes
_YuGo_ wrote: > Ik heb twee tabellen met de kolommen omschrijving en stuks, en ik zou die > met een sql commando moeten kunnen weergeven in 1 query. Als ik select * > from tabel1, tabel2 doe dan komen de kolommen naast elkaar, maar het is de > bedoeling dat ik 2 kolommen heb met de rijen uit de twee tabellen. Wie weet > hier een oplossing voor? > > Davy SELECT * FROM tabel1 UNION SELECT * FROM tabel2 ofwel, als je niet wil dat dubbele rijen eruit gefilterd worden: SELECT * FROM tabel1 UNION ALL SELECT * FROM tabel2 -- "Codito ergo sum" Roel Schroeven
Re: [SQL] Tabellen combineren
Author: YuGo
Date: Thu, 23 Jan 2003 14:05
Date: Thu, 23 Jan 2003 14:05
14 lines
1363 bytes
1363 bytes
> > SELECT * FROM tabel1 > UNION > SELECT * FROM tabel2 > > ofwel, als je niet wil dat dubbele rijen eruit gefilterd worden: > > SELECT * FROM tabel1 > UNION ALL > SELECT * FROM tabel2 > Dat is de oplossing, thx
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads