yeahz Posted April 17, 2009 Report Share Posted April 17, 2009 Kā var izvilkt no datubāzes visa kopējo skaitu? Piemēram, ir tabula: id | count | kautKas un dati: 1 | 13 | abc 2 | 7 | abcdefg un tātad, kā lai saskaita tos count (tā lai gala rezultāts būtu 20(13+7=20))? Quote Link to comment Share on other sites More sharing options...
anonīms Posted April 17, 2009 Report Share Posted April 17, 2009 sum(count) Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted April 17, 2009 Report Share Posted April 17, 2009 (edited) kā lai saskaita tos count (tā lai gala rezultāts būtu 20(13+7=20))? SELECT SUM('count') AS kopejais_skaits FROM tabulis Edited April 17, 2009 by Grey_Wolf Quote Link to comment Share on other sites More sharing options...
bubu Posted April 17, 2009 Report Share Posted April 17, 2009 Pēdiņās gan nevajag likt to count. Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted April 17, 2009 Report Share Posted April 17, 2009 bubu --> jaa tev taisniiba .. atrumaa iemetu :( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.