Expand|Select|Wrap|Line Numbers
- Update contacts set Commonsid =
- (select Commonsid from contacts1 where contactid = contacts.contactid and Commonsid is not null)
- where Commonsid is null
The table 'Contacts1' is copied table of 'Contacts', except that Contacts1 table has values in CommonsID field, while in 'Contacts', the values are null. Contactid is the key for both tables.
I am the database owner, there's no problem of read/write privileges.
Your inputs are highly appreciated.