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.

Empfohlene Antworten

Veröffentlicht

Hey Leute,

bin grade am verzweiflen wie man LEFT JOIN bzw diese JOINs allgemein richtig verwendet.

Die Spalten zeigen bei mir immer NULL ...

Kann jemand mit eigenen Worten die Verwendung von LEFT JOIN erklären bzw mir erklären?

Ich habe eine fertige SQL Query der ich Spalten hinzufügen möchte. Ist mein erstes mal, dass ich mit JOINs arbeite...

Lg.


select it.OptLevel, ch.CharName16, obj.AssocFileIcon128, obj.Country, obj.CodeName128 ,obj.ReqLevel1 , item.ItemClass , adv.nOptValue ,es.EndTextString, ir.ItemIcon
from _Items as it
LEFT JOIN SRO_VT_SHARD.[dbo].[_Inventory] as inv ON it.ID64 = inv.ItemID
LEFT JOIN [dbo].[_Char] as ch ON inv.CharID = ch.CharID
LEFT JOIN [dbo].[_RefObjCommon] as obj ON it.RefItemID = obj.ID
LEFT JOIN [dbo].[_RefObjItem] as item ON obj.Link = item.ID
LEFT JOIN [dbo].[_BindingOptionWithItem] as adv ON it.ID64 = adv.nItemDBID
LEFT JOIN [dbo].[C_EquipStrings] as es on obj.NameStrID128 = es.TextString
LEFT JOIN SRO_VT_ACCOUNT.[dbo].[srcms_ItemRank] as ir on obj.NameStrID128 = ir.ItemIcon

where ch.CharName16 = 'TESTER' and inv.Slot between 0 and 12 and inv.Slot != 8

[/PHP]

post-86876-14430450075847_thumb.png

Nimm als Beispiele:

1.

select kunde.* from kunde left join rechnung on kunde.id=rechnung.kundeid

Du bekommst alle Kunden, egal ob diese eine Rechnung haben oder nicht, denn es kann ja auch Kunden geben, die noch nie eine Rechnung hatten.

2. Eine Rechnung hat aber immer zwingend einen Kunden, also

select kunde.* from rechnung inner join kunde on kunde.id=rechnung.kundeid

Du bekommst alle die Kunden, die mindest eine Rechnung bekommen haben. (ggf. sind kunden auch mehrfach)

Gruß Martin

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.