MYSQL: update field with random fixed char

MySQL

would like to update all record on a field which i only want it to fill it with random either Y or N

currently using:

update table1 set field1=( RAND() FROM Y FOR N)

which is not working, any idea?

Best Answer

solved with this:

update table1 set field1 = case floor(1 + rand()*2) when 1 then 'Y' else 'N' end;