From: newbie on
Hi,

I am writing a query to insert a copy of the row in the same table with one
or two columns having different values. How can I do it?

Lets say I have a table 'Users' with following columns

UserId, UserCountry, UserFirstName, UserLastName, UserEmail, UserPwd

So I would like to copy over all the columns except UserId and a different
value for UserCountry Column, what would my query look like?

Thnx
From: Shiju Samuel on
newbie wrote:

> I am writing a query to insert a copy of the row in the same table
> with one or two columns having different values. How can I do it?

Insert into users
SELECT 'Newvalue', 'US', UserFirstName, UserLastName, UserEmail,
UserPwd from users where ......

--
Shiju Samuel
 | 
Pages: 1
Prev: CLR Threads
Next: Statistics from DTA