C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Updating One tables Column with reference to Second Table


Posted Date: 27 Oct 2007    Resource Type: Code Snippets    Category: SQL

Posted By: http://venkattechnicalblog.blogspot.com/       Member Level: Diamond
Rating:     Points: 5



Below code helps us to update the first table with reference to the second table. I have created two tables and inserted datas in both the tables. Am trying to update the first table by using second tables datas with a common column.


create table aa(id int, sal int)
create table bb(id int, sal int)

insert into aa values(1,100)
insert into bb values(1,200)

select * from aa
select * from bb

update aa set sal = (select bb.sal from bb inner join aa on aa.id=bb.id)





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to filter PK column from the list fields
Previous Resource: To find the fifth Largest row from the table
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use