aes encrypt entire column(field)

after having a field with password values, I found that I should have encrypted when inserting into it. However, with multiple records with non-encrypted password values this jobs would be painstaking to do individually. It would be much simpler if one could just aes encrypt the column(field) in whole. Although I failed to find a single mysql command that would serve my purpose, it could be done in a few commands creating & utilizing a temporary table.
Continue reading “aes encrypt entire column(field)”


select record with max column value

example: mysql> select f1,f2 from tb order by f2 desc limit 1;
say tb has two columns(f1,f2). want to find record with max(f2), the cmd above will do. Of course, it would be a problem if there are multiple records that have max(f2) value. The above can be modified to find record with min(f2) value as well by changing desc to asc. The following is an example from mysql db:
Continue reading “select record with max column value”