mercredi 4 mars 2015

Multiple Selects Into Multiple Columns Encrypted


I am trying to do two select statements on the same table. However I get errors. The reason for this query is one of the columns is 256 bit CRC encrypted. Here is my query:



SELECT (select COLUMNA from TABLE) AS 'NumberA',
(select CAST(aes_decrypt(COLUMNB,'key','IV') AS CHAR) from TABLE) AS 'Number2';


This query throws this error:



Error Code: 1242. Subquery returns more than 1 row


Both of these selects by themselves work fine. However I need to figure out how to select all of the columns and use the encrypted column in the query as well





Aucun commentaire:

Enregistrer un commentaire