Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Select Count (*)

Empfohlene Antworten

Veröffentlicht

Was macht dieser Befehl?

Und Group by?

select dinstinct?

was ist da der Unterschied?

Danke

select count(*) from table; -- gibt dir die Anzahl an Datensaetzen in der Tabelle zurueck.

select distinct department from dept; -- gibt dir alle Varianten von department zurueck, allerdings wird jeder Eintrag nur einmal angezeigt.

select dept, count(*) from emp group by dept; --zeigt dir die Anzahl an Datensaetzen an, gruppiert nach dept.

hth

Das sind Fragen, die Dir die Suchfunktion bzw Google schneller beantwortet hätten, aber was soll 's? Dann mal los:

Select Count (*)

Zählt die Datensätze in der Tabelle (Genauer:Wieviele Treffer für die Abfrage. Weil Du aber keine einschränkenden Bedingungen hast, alle Datensätze).

Group by

Ist ähnlich wie Order by, nur für Aggregatfunktionen.

select dinstinct

Filtert doppelte Datensätze/Ergebnisse heraus. Beispiel:

Select distinct name from Personen where name='Müller';

Wenn da jetzt vier Leute mit dem Namen Müller sind, wird Müller trotzdem nur einmal angezeigt.

Unterschied zwischen was und was?

Hier sind Links, die auch einen Grossteil deiner zukünftigen Fragen beantworten dürften:

Sql in 21 Tagen

Sql-Doku

Sql-Doku2

SQL-Einführung

Viel Spass!

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.