A lot depends on how you define "one statement", but you can certainly use:
Code:
INSERT INTO friends (name) SELECT DISTINCT name FROM details
to take one copy of each name from the details table and place them into the friends table.
It is your call as to whether that is one compound statement, or two atomic statements. From an execution standpoint, they are a single statment executed by the SQL engine. From a syntax standpoint, they are two separate statements that are executed as one.
-PatP