Two SQL tables are associated to modify data, and two SQL tables are associated with data.

Source: Internet
Author: User

Two SQL tables are associated to modify data, and two SQL tables are associated with data.

Hr_w.planweek DepartMent weekly schedule: DepartMent name, DepartMent ID.

G_group Department table: gname Department name, gid department id

Manage the g_group table to modify the DepartMent according to the specified mentid.

Update hr_1_planweek set DepartMent = t. gname from (select gname, gid from g_group left join hr_1_planweek on g_group.GId = hr_1_planweek.departmentid) twhere t




In SQL, when two tables are associated and changed, how does one change the data in the two tables?

..
 
How does sqlserver associate two tables to change the data of a column in one of the tables?

Select 1, 2, 3, distinct (B), c from A inner join B where A.1 = B .1 and A.2 = B. B

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.