2014-01-12 28 views
3

我的查詢是不行AES_ENCRYPT插入到表

INSERT INTO rebuilder (id_utente, pwd)VALUES('75693',AES_ENCRYPT('password','set'))

我沒有錯誤,但在數據庫表中的PWD值爲NULL。

想法? TNX 斯特凡

+0

告訴你表定義請。 – MrSimpleMind

回答

3

看到SQLFIDDLE

create table rebuilder (
    id_utente int, 
    pwd varbinary(200) 
); 

-- data 
insert into rebuilder (id_utente, pwd) 
values (75693,aes_encrypt('password','set')); 

enter image description here

看到SQLFIDDLE

+0

更好是不可能的!謝謝你哦! ;) –