How to get the byte size of resultset in an SQL query?

后端 未结 4 503
囚心锁ツ
囚心锁ツ 2020-12-01 10:58

Is it possible to get the size in bytes of the results of an sql query in MySQL?

For example:

select * from sometable;

ths returns

4条回答
  •  既然无缘
    2020-12-01 11:20

    CHAR_LENGTH() gets number of characters if unicode will be more bytes - use LENGTH() for number of bytes:https://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_length

提交回复
热议问题