Jump to content

the default date setting at creating table


patricksky

Recommended Posts

I have the following creat table script

 


create table event(

event_id varchar(9) primary key,

title varchar(30) not null,

description text,

photo_dir varchar(8),

date date not null default CURRENT_DATE

);

 

when i run this script, the error occur that related to the CURRENT_DATE. the purpose of the date colume set to default current_date is that if user haven\'t given the date, then set this as system current date.

what is the error using CURRENT_DATE ?

Thx~

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.