how to get dump of column in mysql>
I want to have dump of column like var_dump in php.
For eg:
select dump(col_name) from table_name
o/p =>
Typ=96 Len=10: 113,119,101,114,116,121,32,32,32,32
but开发者_开发技巧 it says such function does not exists. which function in,mysql does that or how to go for it
You can use GROUP_CONCAT
to get list of values separated by comma:
SELECT GROUP_CONCAT(col_name SEPARATOR ',') ...
Note. The result of GROUP_CONCAT
depends on max_allowed_packet
and group_concat_max_len
variables; if you have many records in your table, you need to increase default values (SET group_concat_max_len = xxxx
);
精彩评论