andrisp Posted April 22, 2005 Report Share Posted April 22, 2005 man ir divas tabulas, kuraam struktuura ir identiska SELECT * FROM table1, table2 straadaa, bet SELECT column1, column2 FROM table1, table2 saka, ka kolumnu nosaukumi esot 'aizdomīgi' taapat arii SELECT * FROM table1,table2 WHERE column1 = 'foobar' saka ko liidziigu.. paliidziet. man galvenais lai vareetu izmantot WHERE un ORDER BY Link to comment Share on other sites More sharing options...
v3rb0 Posted April 22, 2005 Report Share Posted April 22, 2005 http://dev.mysql.com/doc/mysql/en/select.html un raksti select tablename1.field1 as field1, tablename2.field2 as field2 from tablename1, tablename2 where tiripiri Link to comment Share on other sites More sharing options...
andrisp Posted April 22, 2005 Author Report Share Posted April 22, 2005 http://dev.mysql.com/doc/mysql/en/select.html un raksti select tablename1.field1 as field1, tablename2.field2 as field2 from tablename1, tablename2 where tiripiri 16789[/snapback] bet lai butu vienaa kolumnaa ? Link to comment Share on other sites More sharing options...
Venom Posted April 22, 2005 Report Share Posted April 22, 2005 (select column from table1 where ...) union (select column form table2 where...) ? Link to comment Share on other sites More sharing options...
andrisp Posted April 22, 2005 Author Report Share Posted April 22, 2005 (select column from table1 where ...)union (select column form table2 where...) ? 16792[/snapback] man ir mysql 3 versija, kas neatbalsta union.. mosh ir veel varianti ? bet nu laikam buus vienkaarshi jaaapdeito serveris.. Link to comment Share on other sites More sharing options...
Venom Posted April 22, 2005 Report Share Posted April 22, 2005 create temporary table tmp_table; insert into tmp_table select ... from table1 where ...; insert into tmp_table select ... from table2 where ...; select * from tmp_table; drop tmp_table; ? Link to comment Share on other sites More sharing options...
Recommended Posts