Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL 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
 
Old December 20th, 2004, 05:37 AM
Authorized User
 
Join Date: Aug 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to duplicate 1 row in table


Hi All,

How to duplicate 1 row in the table. This is table has primary key.

Can you help me?

Best regard,

Minh Phan.

 
Old December 20th, 2004, 09:51 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

If you have the primary key auto increment it will automatically assign it a value, so just insert into your table the columns needed.

Code:
Insert into table1 select col1,col2,col3
from table1 where <use the column value here>
Jaime E. Maccou





Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot insert duplicate key row in object 'Table' skyline666 SQL Server 2005 0 April 15th, 2008 05:03 AM
insert a duplicate row with one changed field only swdgaurav SQL Language 1 December 31st, 2007 04:54 AM
Removing duplicate Value Row milindsaraswala Excel VBA 0 November 14th, 2007 06:11 PM
How to remove duplicate row from sheet ketannsharma Excel VBA 1 February 18th, 2007 03:32 AM
duplicate row in crystal report priya_pooja12324 ASP.NET 1.0 and 1.1 Basics 0 November 23rd, 2006 04:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.