• Phil Parkin (5/23/2013)


    Bhaskar.Shetty (5/23/2013)


    You cannot call insert like that, = operator works while you are updating any row or table.

    Before making blanket statements like this, I find that it is always best to double-check, lest you are left looking silly in perpetuity:

    create table #test (ID int)

    insert into #test

    (ID)

    select Id = 1

    union all

    select Id = 2

    select *

    from #test as t

    First check the way insert statement has been written and tried, and solutions what you have given may be one from lot, there are plenty of other solution which you can use it for this purpose.

    before calling other silly better you readout the problem first, the guy has asked whether he can write the statement in that manner or not