Philipp Hasenfratz: Mysql

Beitrag lesen

Halihallo Marco

Kann ich folgendes in eine Mysql-Abfrage packen:
Select count(*) as count from table where feld=0
Select count(*) as count2 from table where feld=1

Ja:

SELECT COUNT(*) AS count, feld FROM table GROUP BY feld HAVING feld=0 OR feld=1

Viele Grüsse

Philipp