lizard Posted July 8, 2007 Report Share Posted July 8, 2007 SELECT kkas1, kkas2 FROM DB1 WHERE id =1122 UNION SELECT kkas3 ??? FROM users WHERE id =1 Sveiki, Vai kāds pāris vardos var apskaidrot kā pareizi janorāda kolonnu numuri? Izlasiju manuāli bet isti neiebraucu... Link to comment Share on other sites More sharing options...
andrisp Posted July 8, 2007 Report Share Posted July 8, 2007 Īsti nesapratu ? UNION ir domāts, lai no vairākām tabulām izveidotu vienu tabulu (Kaut kā tā). Selected columns listed in corresponding positions of each SELECT statement should have the same data type. Link to comment Share on other sites More sharing options...
bubu Posted July 8, 2007 Report Share Posted July 8, 2007 Kolonnu numurus norāda ar naturāliem skaitļiem - 1, 2, 3, ... Labāk pastāsti ko tu ar šo kveriju gribi panākt. Link to comment Share on other sites More sharing options...
lizard Posted July 8, 2007 Author Report Share Posted July 8, 2007 Man te vinsh viena koda ir ieksha, es megjinu izprast, bet zinamu iemeslu delj pashu kodu dot nevaru :( Ko tie naturaljie skaitlji isti dod? Link to comment Share on other sites More sharing options...
Kaklz Posted July 8, 2007 Report Share Posted July 8, 2007 Piedod, bet zināmu iemeslu dēļ tev neviens nevarēs palīdzēt ;) Nu nevar neviens izzīlēt, ko tu gribi panākt un kas tev tur īsti ir sarakstīts. Link to comment Share on other sites More sharing options...
bubu Posted July 8, 2007 Report Share Posted July 8, 2007 Ko tie naturaljie skaitlji isti dod? Bah.. tu tak pats prasīji: Vai kāds pāris vardos var apskaidrot kā pareizi janorāda kolonnu numuri? Es tev atbildu, a tu prasi, kāds bija jautājums... Neliekas pašam jocīgi. Link to comment Share on other sites More sharing options...
lizard Posted July 8, 2007 Author Report Share Posted July 8, 2007 Nu ja kiskatas, bet es jautajot biju domajis, uzjautat, ko tieshi vinji norada kuras kolonnas no kuras tabulas... Link to comment Share on other sites More sharing options...
bubu Posted July 8, 2007 Report Share Posted July 8, 2007 Tad tā arī vajag jautāt. Neviens te nav gaišreģis, lai izzīlētu tavu jautājumu. Tas, ko jautā, ir aprakstīts šajā linkā: http://dev.mysql.com/doc/refman/5.0/en/select.html#id3359761 Columns selected for output can be referred to in ORDER BY and GROUP BY clauses using column names, column aliases, or column positions. Column positions are integers and begin with 1 un vēl: Use of column positions is deprecated because the syntax has been removed from the SQL standard. Link to comment Share on other sites More sharing options...
Recommended Posts