MySQL: Casting a varchar field to a number cast('1' as int) doesn't work, bu…

Filed Under (Uncategorized) by admin on 30-01-2008

MySQL: Casting a varchar field to a number

cast('1' as int) doesn't work, but '1'*1 does!

select * from log_entries where subtype = 'Invitation.Required' and action = 'Render' and created_at > '2008-01-28' order by data*1  asc;

Post a comment