Skip to content

Instantly share code, notes, and snippets.

@LeandroLS
Created June 24, 2017 17:10
Show Gist options
  • Save LeandroLS/b5bb85be231955b4236fdc44051f3a76 to your computer and use it in GitHub Desktop.
Save LeandroLS/b5bb85be231955b4236fdc44051f3a76 to your computer and use it in GitHub Desktop.
Post GROUP_CONCAT() no MySQL
SELECT GROUP_CONCAT(nome) FROM contas;
+-------------------------------------------------------------------------------------------------------+
| GROUP_CONCAT(nome) |
+-------------------------------------------------------------------------------------------------------+
| Salario,Rendimento de investimentos,Recebimento de aluguel,Conta de água,Conta de luz,Jogos da Steam |
+-------------------------------------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment