Hello.


MySQL doesn't support this syntax. See:

  http://dev.mysql.com/doc/refman/5.0/en/create-table.html



If you want to automatically extract the year (month, day) part

from the inserted value, you may want to use TRIGGERS, however,

in my opinion, it is better to redesign your table structure. You

can use VIEWS to make the design of your database more flexible. See:

  http://dev.mysql.com/doc/refman/5.0/en/views.html

  http://dev.mysql.com/doc/refman/5.0/en/triggers.html







Mester József wrote:

> Hy all

>   

>   I would like to get date in my web page.

>   There are three different fields. YEAR MONTH and DAY

>   I thought in SQL possible create table like this /*from my book*/

>   

>   create table dates ( input_year DATETIME YEAR TO YEAR, 

>                                 input_month  DATETIME MONTH TO MONTH,

>                                 input_day  DATETIME DAY TO DAY);

>   

>   In this example I can store year,month and day values in different fields.

>   Mysql doesn't accept this create statement.

>   

>   Joe

>   

>   

> 

>               

> ---------------------------------

> Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with 
> voicemail 



-- 
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