Combine columns

Pagina: 1
Acties:
  • 43 views sinds 30-01-2008

  • Jurgle
  • Registratie: Februari 2003
  • Laatst online: 26-05 23:44

Jurgle

100% Compatible

Topicstarter
Ik heb twee tabellen:

Table A:
+------+--------+---------+
| a_id | value1 | value2 |
+------+--------+---------+
| 1 | iets | nogiets |
| 4 | foo | bar |
+------+--------+---------+

Table B:
+------+--------+---------+
| b_id | value1 | value2 |
+------+--------+---------+
| 2 | iets | nogiets |
| 3 | foo | bar |
+------+--------+---------+

Feit is dat als je een array_merge zou uitvoeren op a_id en b_id, je een array zou krijgen met enkel unieke id's. DUS: een waarde van a_id komt niet voor in b_id en andersom.

Hoe kan ik nu in 1 query (SQL) de max(max(a_id), max(b_id)) krijgen?

My opinions may have changed but not the fact that I am right ― Ashleigh Brilliant


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Geen touw aan vast te knopen... Lees P&W FAQ - De "quickstart" eens :)

Professionele website nodig?


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Ter verduidelijking: je zondigt tegen ongeveer 8 v/d 9 puntjes van die Quickstart ;)

Professionele website nodig?


Dit topic is gesloten.