Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulate INSERT/UPDATE/DELETE (SELECT ...) by WITH v AS (SELECT ...) INSERT/UPDATE/DELETE v on SQL Server #3606

Closed
lukaseder opened this issue Aug 29, 2014 · 0 comments

Comments

@lukaseder
Copy link
Member

lukaseder commented Aug 29, 2014

SQL Server doesn't explicitly support inserting into inline views like Oracle:

INSERT INTO (SELECT ...)

But this query can be emulated using common table expressions:

WITH v AS (SELECT ...) INSERT INTO v

Other databases could probably do the same.

This also works with UPDATE and DELETE


See also #3607

@lukaseder lukaseder added this to the Version 3.5.0 milestone Aug 29, 2014
@lukaseder lukaseder modified the milestones: Version 3.6.0, Version 3.5.0 Sep 3, 2014
@lukaseder lukaseder modified the milestones: Version 3.9.0, Version 3.8.0 Mar 1, 2016
@lukaseder lukaseder changed the title Emulate INSERT INTO (SELECT ...) by WITH v AS (SELECT ...) INSERT INTO v on SQL Server Emulate INSERT/UPDATE/DELETE (SELECT ...) by WITH v AS (SELECT ...) INSERT/UPDATE/DELETE v on SQL Server May 29, 2017
lukaseder added a commit that referenced this issue Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant