Jump to content

Create Table With Now() Column


Gatsu
 Share

Recommended Posts

I use this which I copied from your example with few edits to fit my purposes:

CREATE TABLE tickets(id int NOT NULL auto_increment,ticket int NOT NULL,timea datetime NOT NULL DEAFULT NOW(),PRIMARY KEY (id))

I get thise error:#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEAFULT NOW(), PRIMARY KEY (id) )' at line 5CREATE TABLE tickets(id int NOT NULL AUTO_INCREMENT ,ticket int NOT NULL ,timea datetime NOT NULL DEAFULTNOW( ) ,PRIMARY KEY ( id ))Why?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...