Reply to Re: Copy data from one table to another table with change in identity column values

Your name:

Reply:


Posted by Roy Harvey on 08/20/07 13:09

If I understand your question, you want to insert the data from table
test into an already existing table.

INSERT existingtable
SELECT a, b
FROM test

Roy Harvey
Beacon Falls, CT

On Mon, 20 Aug 2007 09:21:30 -0000, satish
<satishkumar.gourabathina@gmail.com> wrote:

>HI,
>I have a table
>Create table test(a int identity(1,1), b int)
>insert into test(b) values(12)
>insert into test(b) values(30)
>insert into test(b) values(65)
>insert into test(b) values(78)
>insert into test(b) values(36)
>
>o/p
>a b
>1 12
>2 30
>3 65
>4 78
>5 36
>
>i need to copy the table into another table with creating the new
>table
>we had a option
>select * into newtable from oldtable
>here the data in the oldtable will e copied to new table without
>creating new table
>but i need to copy the data as shown below with out creating new
>table
>o/p
>a b
>11 12
>12 30
>13 65
>14 78
>15 36
>
>Thanks,
>Satish

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация