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
- TypeError: ‘float’ object is not subscriptable
- What is a user agent stylesheet?
- Making an iframe responsive
- Chrome give error **Failed to load resource: net::ERR_NAME_NOT_RESOLVED** while other browser load images
- PLS-00103: Encountered the symbol “CREATE”
- Is background-color:none valid CSS?
- Oracle SQL Developer: Failure – Test failed: The Network Adapter could not establish the connection?
- How to make padding:auto work in CSS?
- How can I make my footer center to the bottom of the page?
- How to vertically center inside the parent element with CSS?
- Why is marquee deprecated and what is the best alternative?
- Refresh/reload the content in Div using jquery/ajax
- How to make my website fit any screen size?
- Display:inline not working
- How to apply font on WordPress?
- How to enqueue style before style.css
- How to apply a class to the second word in menu list item?
- Why max-width:97.5% on content images?
- How to add the main style.css to my index.php?
- First completely customized theme, where should I start?
- hSite has no css on mobile [closed]
- Relative path in wp_register_style not working
- WordPress override bloginfo variable
- How to Add Custom CSS Buttons to WordPress as a Shortcode?
- How do you customize the admin bar for buddypress?
- Is there CSS to expand the gallery limit on Index Pages?
- How to remove default style of header in wordpress metabox
- Registering a stylesheet inside my WordPress widget
- Code working just in specific time period
- Style WP_Debug?
- CSS Styling a specific page
- Visual Editor: Paragraph styles appear to one admin but not to others
- Search Bar in Thesis WordPress Site
- Making that Admin Bar transparent or a blue color
- Add core style in theme
- How to sync the style in the visual editor with the style of a child theme?
- Twentyfifteen style author comment
- Custom css author role
- Sidebar widgets – dynamic CSS : problem with widget-title
- Multiple Stylesheets For Post and post type?
- How to format the first line of a post differently?
- Date based CSS/theme
- Change the “Register” headline in Woocommerce
- broken internal JavaScript and CSS files
- avada woocommerce product details in grid
- Landing Page with HTML CSS JS and Images on wordpress
- I can’t go to the page archive-{post_type}.php
- How can I modify the CSS only for the search results page of WordPress?
- How to display image on WordPress homepage
- Trying to hide the contact form on a particular page
- Default Gutenberg CSS on frontend
- How to adjust text’s width and put it at center of post (Visual) editor?
- How can I delete the word `Category:` from page titles? [duplicate]
- different theme output for desktop and mobile
- Font size decreases when child theme is created from parent theme?
- Enqueue CSS and Script only if needeed
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- Why does my edit screen suddenly have such a buggy interface?
- resize chat bar on mobile [closed]
- Trying to remove white space between nav bar and content?
- Colouring the text on the video
- Why the slideshow is not shown in my theme?
- Multiple Block Quotes without using HTML
- How to get shared CSS body class between translated WPML pages [closed]
- How can I display my meta value in a textarea? [closed]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- Dequeue classic-themes.min.css
- WooCommerce: I Need to hide my page title/header (including menu) from all the WooCommerce related product pages, such as category and keyword pages
- How can I add a section with a different background color?
- WooCommerce Checkout Cart [closed]
- I am having trouble displaying an image at the top of a widget area [closed]
- How to display product variations on same row
- Image and font support missing in editor when deploying theme remotely
- Editing size of h3 tag in wordpress on a one-off basis
- Content doesn’t fit on large size desktops like 2560×1440