Checksum of SELECT results in MySQL -


trying check sum of results of select statement, tried this

select sum(crc32(column_one)) database.table; 

which worked, did not work:

select concat(sum(crc32(column_one)),sum(crc32(column_two))) database.table; 

open suggestions, main idea valid checksum sum of results of rows , columns select statement.

the problem concat , sum not compatible in format.

concat designed run once per row in result set on arguments defined row.

sum aggregate function, designed run on full result set.

crc32 of same class of functions concat.

so, you've got functions nested in way don't play nicely together.

you try:

select concat(     (select sum(crc32(column_one)) database.table),     (select sum(crc32(column_two)) database.table) ); 

or

select sum(crc32(column_one)), sum(crc32(column_two)) database.table; 

and concatenate them client language.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -