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.

MySQL äquivalent zu Oracle "starts with .. connect by"

Empfohlene Antworten

Hallo zusammen,

bin gerade dabei eine Oracle DB auf MySQL zu migrieren.

Dabei muss ich nun ein Statement umschreiben, dass in Oracle SQL mit

"... starts with ... connect by.." formuliert wurde.

Gibts in MySQL dazu ein äquivalent? Oder kann man sowas auch anders Umschreiben?

Danke und Gruß,

Markus

Hi Amstel,

danke für den Link..

Wenn ich das richtig verstehe, muss ich aber bei dem vorgehen mit dem Self Join vorher schon genau wissen, wieviele "Ebenen" mein Baum hat, oder?

z.b. (Code aus dem Link von oben):

SELECT t1.name AS lev1, t2.name as lev2, t3.name as lev3, t4.name as lev4

FROM category AS t1

LEFT JOIN category AS t2 ON t2.parent = t1.category_id

LEFT JOIN category AS t3 ON t3.parent = t2.category_id

LEFT JOIN category AS t4 ON t4.parent = t3.category_id

WHERE t1.name = 'ELECTRONICS';

Das geht nur für mit 4 Ebenen tiefen Bäumen... Wie mach ich das für eine beliebige Tiefe...?

Viele Grüße,

Markus

bei komplexeren statements würde ich da eher auf procedures übergehen.

s'Amstel

  • 2 Wochen später...

Hi s'Amstel,

wenn ich das ganze mit einer procedure mache, dann werden aber auch N-Select Statements abgesetzt..?

Scheint mir nicht wirklich eine effiziente Lösung zu geben in MySQL..

Viele Grüße,

Markus

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.