virtualcook Posted November 24, 2003 Report Share Posted November 24, 2003 ... vai MySql var izpildīt SQL ar apakšpieprasījumu? ... ja jā, tad kāpēc es nevaru izpīldīt šādu pieprasījumu? SELECT tabula1_kolonna1 FROM tabula1 WHERE tabula1_kolonna2 = (SELECT tabula2_kolonna1 FROM tabula2 WHERE tabul2_kolonna2 = '2') AND tabula1_kolonna3 = '1' Link to comment Share on other sites More sharing options...
Roze Posted November 24, 2003 Report Share Posted November 24, 2003 Tikai saakot no 4.1 versijaas.. Lai gan vairaak vai mazaak visu var norealizeet ar JOINIEM u.c. veidos Piem: SELECT tabula1.kolonna1 FROM tabula2, tabula1 WHERE tabula1.kolonna2 = tabula2.kolonna1 AND tabula2.kolonna2 = '2' AND tabula1.kolonna3 = '1' Link to comment Share on other sites More sharing options...
sorehead Posted November 24, 2003 Report Share Posted November 24, 2003 Vai kads ir testeejis, kas atrak stradaa joini vai apakšelekti ? Roze, es domaju, ka tu siis lietas esi peetijis vairaak? Link to comment Share on other sites More sharing options...
Qued Posted November 25, 2003 Report Share Posted November 25, 2003 Nezinu, kā MySQL, Bet MSSQL gadījumā join VIENNOZĪMĪGI strādā ātrāk nekā apakšselekti. Link to comment Share on other sites More sharing options...
Roze Posted November 25, 2003 Report Share Posted November 25, 2003 Subselecti buus leenaaki. Vienkaarshi ir kveriji kurus ne vienmeer var paarakstiit (vienaa pieprasiijumaa) lai netiktu tie izmantoti, liidz ar to eertiibas labad reizeem naakas upureet aatrdarbiibu :) Link to comment Share on other sites More sharing options...
Recommended Posts