By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,589 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,589 IT Pros & Developers. It's quick & easy.

for update statement

P: 2
Hello,

There are 2 tables. consider ..

table A table B
--------------- --------------------------
col1 col2 col1 col2
aa 111 aa
bb 2222 bb
ccc 33 ccc 34


some of the values in the col2 are null. can u tell me how to write an update statement where we has to fill the null values with the col2 values from tableA to the tableB.. can you please reply with me as soon as possible...
Oct 9 '07 #1
Share this Question
Share on Google+
1 Reply


P: 14
update tableb a set col2=(select col2 from tablea b where a.col1=b.col1)
and a.col2 is null
Oct 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.