I found the answer
UPDATE `wp_postmeta` SET `meta_key` = 'ref' WHERE `meta_key` = 'refer'
use this part in your SQL
Related Posts:
- Custom Field Create Bulk via SQL Query
- searching by keywords in post’s metas or pagination links problem
- query specific posts according their custom fields, using sql SELECT
- SQL Query to copy value of a meta_key into another meta_key
- How to correctly call custom field dates into a posts_where filter using SQL statements
- Add custom fields to search
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- How can I make wp-pagenavi work on a custom query built upon a form submission? [closed]
- Meta Query with AND & OR?
- Bulk move (or copy) from a custom field to the post content?
- Up/Down voting system for WordPress
- Custom Fields Bulk Edit
- Plugin similar to Taxonomy Drill-Down for custom fields?
- How do I query for a post by custom field?
- Count how many posts have a custom field set
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- sort search results by custom fields using dropdown
- Get all posts that do not have a specific custom field without using a subquery
- How can I sort homepage by a meta value?
- Loop to display random posts only if a custom field matches category
- Conditional custom field query
- Order query by meta_value with multiple custom fields
- Display only past events on that page using Visual Composer Grid Bulider
- Create Pop-Up Box with Custom Field Content Inside the Loop
- query usermeta from custom field
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- Order RSS content by an advanced custom field value
- UPDATE on SELECT results. A SQL query to swap Author with Meta Box value
- Alter main archive, to show posts with meta as last
- Meta Query And/Or
- Trying to reorder posts by custom field
- Limits, not all post are showen when querying for posts by view count
- Why orderbyb meta_value_num won’t affect the generated SQL Query order?
- Get post ids sorted by meta_key
- querying a custom field
- pre_get_posts : only get posts by wp_usermeta value
- Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months
- How to query an out put value?
- List custom queried terms in the edit-tags.php?taxonomy page
- Modify date query by URL parameter using pre_get_posts and $_GET
- Get emails from users by custom field SQL
- Loop through incrementing custom fields
- Custom search SQL Query to add custom field in result
- The best way to collision check in WP
- SQL: Select wordpress posts with given text string and add a custom field to them?
- How to exclude custom fields from search queries?
- WP_Query () using taxonomy, custom post types
- Show array of meta_value in Edit Post Coloum
- How to query for posts with either one or another custom field
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- Custom Query: query by post custom meta data
- Get array of posts based on custom field values
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- How to query posts by month based on date custom field?
- Custom Field Date Problem
- Compare ACF date field (if exists) and post date and order DESC
- Change word in woocommerce product category custom field
- Problem with revisions only returning four results
- Search & column order by meta value in admin
- Dynamically populate query source in Elementor post widget
- SQL query to change the value of a Custom Field
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Create custom query for search?
- Convert all dates in field to Unix time, except those already in Unix time
- Meta_query not filtering posts
- Get multiple posts with some custom fields efficient
- How to add a prefix to existing custom fields over MYSQL query?
- Complex WP_Query Using Post Date And Post Meta
- Alter SQL query to return posts with unique custom field value, no duplicate values
- How to check if custom field exists in this widget query
- Only show content slideshow if “slideshow” custom field exists
- Update field name without losing the value
- How to display search query as formatted text?
- SQL query based on two different custom field values
- How to add content with a filter when there’s no content in the editor
- Show first posts with custom field not empty and order all by title
- Login_form add to top of form rather then bottom
- meta_query ‘compare’ => ‘!=’ not working
- Advanced Custom Fields from Category – IF statement
- Check for meta data before it is published
- Query Multiple meta
- If metabox fields has content display content
- How i make a custom sql query for Woocommerce
- I have a form with a custom button ,i want to add the field data to an database when clicking the custom button
- $wpdb query for price in custom field value
- Stop truncation of shortcodes in custom text fields?
- Delete custom meta
- custom field images do not display until page save
- How to check custom fields from functions.php
- Save custom post data outside of default post form
- display custom media folders to wordpress media popup
- Should I store arrays in custom fields or create custom tables?
- Get custom field outside wordpress loop on new php page
- Retrieving Advanced Custom Field within Shortcode Function [closed]
- Query Posts based on custom field value
- How to format the various types of custom fields?
- Problem saving meta data
- How to properly get popular Posts by multiple Values
- Admin – Search Events by a custom field
- How to add a default field Name to post Custom Fields