I am having two tables in MS SQL SERVER 2005 in master database.
1st table is Country & 2nd is City.
[B][U]I want to know the command for Copying a Column(with values) for eg say Name from City Table to Country Table. Column is not empty, its having values(data entries).
Hope to see someones reply soon..
Thanks a lot!!
[/U][/B]
anish99virgo
0
Newbie Poster
Recommended Answers
Jump to PostHave you tried using
insert into .......select from ......
Jump to Postfollowing query is only for MSSQL. Also to update you must have some relation between the two table.
UPDATE tableA SET column_in_A = b.ColumninB FROM tableB b WHERE tableA.keycolumn1 = b.keycolumn1 and tableA.keycolumn2 = b.keycolumn2
Jump to PostAll the replies to you have been based on reasonable assumptions based on what you said. Because you aren't clear on what you want, you force people to guess. I'm guessing based on your not liking the responses you have gotten.
I'm going to re-write your question and answer …
All 9 Replies
debasisdas
580
Posting Genius
Featured Poster
urtrivedi
276
Nearly a Posting Virtuoso
anish99virgo
0
Newbie Poster
debasisdas
580
Posting Genius
Featured Poster
kplcjl
17
Junior Poster
Knvn
commented:
Nice Attempt
+1
anish99virgo
0
Newbie Poster
debasisdas
580
Posting Genius
Featured Poster
kplcjl
17
Junior Poster
kplcjl
17
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.