Unique key constraint in mysql I have a table in mysql which has a many columns,one of them being time.I want HOUR(time) as unique key for the table,that is there should only be one record for every hour.How can i do it?
You could use a simple integer column as your hourly key constraint. The unique hour for each possible time can be determined by

select floor(now()/10000)


which will return something like 

2015090511


for the current date 5.9.2015 at  11.25h