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?
- Add a Jquery Datepicker to custom field in post edit
- Show links to archive pages based on custom field values
- checkbox in post add/edit to add/remove the post from menu
- Custom Page Template [closed]
- How to add a predefined custom field without using a plugin?
- How to enable Custom Fields that are disabled by theme?
- WPML & CFT: keeping custom field file to translation
- How do I Implement Atomic Update of Post Metadata?
- Want to make A CSS if meta key value is empty
- Custom Query – Based on user input
- Select custom posts by meta_value and sort by a different meta value
- Adding extra fields to front end signup form
- Problem uploading different files as custom fields with front end post form
- How to change order of posts in admin
- make a dropdown custom field with ‘cities’ list in it
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Custom field on Quick Edit using select/dropdown – almost working right but not showing currently selected value
- Move the post title to another field
- SQL to Query the db and return all posts and it’s metas
- How to display a specific category using a custom Query in WordPress?
- Permalink structure depending on custom field
- How to add custom_fields value in JSON API using create_post
- Parse Shortcodes in Theme’s Custom Field?
- Archive for custom fields?
- Remove posts that start with similar words (like a delete duplicate posts plugin)
- Search by Custom Field content OR post id via the WordPress Dashboard
- Query ‘orderby’ when there are multiple values for the same meta_key