MYSQL: update record random 2 fixed char -


i update record on field want fill random either y or n

currently using:

update table1 set field1=( substring(md5(rand()) y n)

which not working

update table1 set field1 = case floor(1 + rand()*2) when 1 'y' else 'n' end; 

Comments

Popular posts from this blog

c# - ItextSharp font color issue in ver 5.5.4+ -

jquery - Multiple issues with pushstate: history, loading, calling functions -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -