correlated sub query

  • hey all

    is correlated sub query only for SELECT?

    can there be a "insert" in a correlated sub query?

    can anyone tell me with an example of correlated query with a "insert into" statement?

    thanx

    Rajiv.

  • Ah, an INSERT you seek.

    A SELECT it is, only with a clear destination ! No difference otherwise!

    The same syntax applies:

    INSERT INTO DestTable

    SELECT ID, (SELECT .. FROM SomeOtherTable WHERE ..) Tmp

    FROM yourtable

    The answer is within! Do not try it. Do it. or do not. There is no "try"!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply