开发者

SQL Help : Update a field

开发者 https://www.devze.com 2023-01-25 19:15 出处:网络
I have 2 table开发者_开发技巧s course and course1 Both the tables havefields called name and id.

I have 2 table开发者_开发技巧s course and course1 Both the tables have fields called name and id. Table course's id field is currently null. I need to update course table's id field with id of the course1, both tables are related with name field.

I am using access.

Thanks

Prady


update [course 1]
inner join [course]
on course.name = [course 1].name
set [course 1].ID = [course].ID;


update table1 set id = b.id from table1 a inner join table2 b on a.name = b.name

This works on SQL Server. I haven't tried on Access but give it a try.

0

精彩评论

暂无评论...
验证码 换一张
取 消