MySQL: how to trim the content of a cell to make SELECT output more readable -


i have mysql table 6 columns. of columns contain long json strings have newlines , spaces. when list content of table select statement, output messy.

is there command (or default setting can change), limit output of each column first few meaningful characters, each row show single line regardless of cell content? like:

+---------------------------+-------------------------+---------+-----------+--------------+----------+ | jsondata                  | column2                 | column3 | column4   | column5      | column6  | +---------------------------+-------------------------+---------+-----------+--------------+----------+ | { "text":[{"user_id":"3","| abcdefabcdefabcdefabc   |       3 | abcabca   | txt          | { "email"| +---------------------------+-------------------------+---------+-----------+--------------+----------+ 

i don't know settings can permanently change in db, should format output describe it:

select column2, column3, column4, column5, replace(cast(jsondata char(20)), '\n', '') jsondata tablename; 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -