Hello.


No, you can't. But you can make some workarounds. For example

you may use triggers in 5.0.2 version (but it is still not

production ready) or use a separate field for storing the

value of the week.







Hany Nagaty <[EMAIL PROTECTED]> wrote:

> Hi all,

> 

> I'm a bit new to MySQL, it's my first email to the list. 

> 

> Well, my question is: Can I have a key on a function of the column.

> I have some table with a date column in it. I wish to have a key on

> yearweek(datecolumn). I don't want to allow having duplicate weeks in

> the table.

> 

> Thanks for your support.

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to