Details

    Description

      The MERGE statement as in https://en.wikipedia.org/wiki/Merge_(SQL) should be implemented.

      Attachments

        Issue Links

          Activity

            nicolamarangoni Nicola Marangoni added a comment - - edited

            It would be nice to have the MERGE implemented like in SQL Server 2008 and not like in Oracle or DB2:

            MERGE
              targetTable
            USING
              sourceTable
            ON
              mergeCondition
            WHEN MATCHED THEN
              updateStatement
            WHEN NOT MATCHED BY TARGET THEN
              insertStatement
            WHEN NOT MATCHED BY SOURCE THEN
              deleteStatement
            

            This implementation allows for the switch WHEN NOT MATCHED, WHEN NOT MATCHED BY TARGET and WHEN NOT MATCHED BY SOURCE
            Oracle and DB2 only allow WHEN NOT MATCHED.

            https://www.essentialsql.com/introduction-merge-statement/

            nicolamarangoni Nicola Marangoni added a comment - - edited It would be nice to have the MERGE implemented like in SQL Server 2008 and not like in Oracle or DB2: MERGE targetTable USING sourceTable ON mergeCondition WHEN MATCHED THEN updateStatement WHEN NOT MATCHED BY TARGET THEN insertStatement WHEN NOT MATCHED BY SOURCE THEN deleteStatement This implementation allows for the switch WHEN NOT MATCHED, WHEN NOT MATCHED BY TARGET and WHEN NOT MATCHED BY SOURCE Oracle and DB2 only allow WHEN NOT MATCHED. https://www.essentialsql.com/introduction-merge-statement/

            The MERGE statement can be complex to migrate if not implemented in MariaDB Server directly:
            It is not just a REPLACE INTO, but can be - depending on the application case - a rather complex statement ("UPSERT").

            Please implement.

            abienemann Alexander Bienemann (Inactive) added a comment - The MERGE statement can be complex to migrate if not implemented in MariaDB Server directly: It is not just a REPLACE INTO, but can be - depending on the application case - a rather complex statement ("UPSERT"). Please implement.
            greenman Ian Gilfillan added a comment -

            This was recently covered on modern-sql.com: https://modern-sql.com/caniuse/merge

            greenman Ian Gilfillan added a comment - This was recently covered on modern-sql.com: https://modern-sql.com/caniuse/merge

            People

              Unassigned Unassigned
              abienemann Alexander Bienemann (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.