Set Display Name to first and last name (phpmyadmin SQL Query)

I know this is an old question, but for anyone still looking how to achieve this, the following query should do the job:

UPDATE wp_users
INNER JOIN wp_usermeta AS fn_meta ON wp_users.ID = fn_meta.user_id AND fn_meta.meta_key = 'first_name'
INNER JOIN wp_usermeta AS ln_meta ON wp_users.ID = ln_meta.user_id AND ln_meta.meta_key = 'last_name'
SET wp_users.display_name = CONCAT(fn_meta.meta_value, ' ', ln_meta.meta_value)

Basically you need to add two user meta joins – one to retrieve first name and another for last name, since they are stored in separate rows.

I would highly recommend testing this on a testing/staging server before running it in production.