su_kumar11
SSCommitted
Points: 1675
More actions
August 9, 2008 at 7:06 am
#123818
Hi,
Can any one tell me how to insert data with select statement in same table?
Regards,
Sunil..
RBarryYoung
SSC Guru
Points: 143329
August 9, 2008 at 7:54 am
#855684
Like this:
INSERT INTO FooTable (Col_X, Col_Y, Col_Z)
SELECT Expression_1, Expression_2, Expression_3
FROM FooTable
WHERE SomeCondition_A
AND SomeCondition_B
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply