This is called a correlated update
UPDATE table1 t1 SET (name, desc) = (SELECT t2.name, t2.desc FROM table2 t2 WHERE t1.id = t2.id) WHERE EXISTS ( SELECT 1 FROM table2 t2 WHERE t1.id = t2.id )
Assuming the join results in a key-preserved view, you could also
UPDATE (SELECT t1.id, t1.name name1, t1.desc desc1, t2.name name2, t2.desc desc2 FROM table1 t1, table2 t2 WHERE t1.id = t2.id) SET name1 = name2, desc1 = desc2
Related Posts:
- How can I replace text with CSS?
- jQuery if div contains this text, replace that part of the text
- How to place a text next to the picture?
- CSS no text wrap
- Vertical Text Direction
- Indent starting from the second line of a paragraph with CSS
- Text border using css (border around text)
- How to replace multiple substrings of a string?
- Making text background transparent but not text itself
- How to place Text and an Image next to each other in HTML?
- Setting a max character length in CSS
- Align text to the bottom of a div
- Text wrapping around a div
- How can I align text directly beneath an image?
- Automatically decrease font size for long words
- How to Add a Read-only Textbox With Text in it That Has a Button to Copy it?
- Test wrapping cutting words in half on my WP site [closed]
- How to style text in WordPress
- How to swap text in menu item back and forth?
- add css to only body text
- Move text from the side of image to below image [closed]
- Specific text not affected by CSS style [closed]
- Woocommerce align prices and texts [closed]
- Change sidebar product category text color (woocommerce) [closed]
- Edit the text location of a form
- Open source social media icons to download and use on website? [closed]
- How to make a monopoly board using css grid?
- What’s the difference between SCSS and Sass?
- CSS reset – What exactly does it do?
- When to use margin vs padding in CSS [closed]
- SVG center horizontal and vertical line
- Renaming column names in Pandas
- Can I change Bootstrap button color?
- How am I supposed to use index.html?
- Is it bad practice to comment out single lines of CSS with //?
- Half circle with CSS (border, outline only)
- How to draw a half circle (border, outline only) [closed]
- CSS calc width and height values
- Column order manipulation using col-lg-push and col-lg-pull in Twitter Bootstrap 3
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Adding border to SVG image
- What does !important mean in CSS?
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Random gradient background color
- CSS Circle with border
- How to horizontally center an element
- Center image using text-align center?
- Unblur content inside blurring background div
- How do I make a transparent border with CSS?
- How to replace all occurrences of a string in JavaScript
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found) css
- How to change CSS using jQuery?
- Set line spacing
- See answer keys in Google Form (quiz) source page?
- CSS Background Opacity [duplicate]
- Remove blue underline from link
- Replace ‘ with \’ in a string
- Angular: conditional class with *ngClass
- Print string to text file
- CSS Background Opacity [duplicate]
- Outline effect to text
- Customize Bootstrap checkboxes
- Making a
- MySQL string replace
- Converts scss to css [closed]
- How to extract text from a PDF? [closed]
- TypeError: ‘float’ object is not subscriptable
- React.js inline style best practices [closed]
- SQL error “ORA-01722: invalid number”
- Remove class using jQuery
- What is a user agent stylesheet?
- Using two CSS classes on one element
- TypeError: ‘float’ object is not subscriptable
- ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
- What is the difference between CSS and SCSS?
- What is a user agent stylesheet?
- How do I find all files containing specific text on Linux?
- How do I vertically align text in a div?
- Is there a CSS parent selector?
- Hide scroll bar, but while still being able to scroll
- CSS background-image-opacity?
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- QL Error: ORA-00933: SQL command not properly ended
- Vertically align text within a div
- Resize image proportionally with CSS?
- Setting table column width
- How to align a to the middle (horizontally/width) of the page [duplicate]
- How do I vertically align text in a div?
- How to set a border for an HTML div tag
- node.js string.replace doesn’t work?
- Animate the overflow property
- How can I center text (horizontally and vertically) inside a div block?
- Set parent style via child
- How to use operator ‘-replace’ in PowerShell to replace strings of texts with special characters and replace successfully
- Embed image in a
- What is the proper way to display a logo with CSS?
- Replace substring in PowerShell
- Setting table column width
- Why does z-index not work?