Skip to content

Instantly share code, notes, and snippets.

@camaech
Created July 24, 2016 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camaech/f1a6693264534d6763f2a4f879f22909 to your computer and use it in GitHub Desktop.
Save camaech/f1a6693264534d6763f2a4f879f22909 to your computer and use it in GitHub Desktop.
Insert additional custom meta to all users
INSERT INTO vsc_usermeta (user_id, meta_key, meta_value)
(SELECT ID AS user_id, 'division'
AS meta_key, 'north' AS meta_value
FROM vsc_users WHERE ID NOT IN
(SELECT user_id FROM vsc_usermeta WHERE meta_key = 'division'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment