insert a duplicate row with one changed field only
|
SQL LanguageSQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
insert a duplicate row with one changed field only
hi,
i hav to insert a duplicate row with one changed field only.
table doesn't have any primary key.
field to be changed is also the field used for selection crieteria.
i m using sql server 2005.
please help.
thanks.
It is very poor practise, that you are using table without primary key, you will not able to delete/update record properly, if you are using sql server. Can't you write two insert statments, one by one, with changed value.