SQL查詢:想不通爲什麼這個sql查詢不工作
CREATE TABLE mytbl.customer(
CustID int(10) NOT NULL AUTO_INCREMENT ,
FirstName varchar(40) ,
LastName varchar(40) ,
Street varchar(50) ,
City varchar(40) ,
State varchar(40) ,
ZipCode varchar(5) ,
Telephone varchar(20) ,
CellPhone varchar(20) ,
CellCarrier varchar(20) ,
UserName varchar(20) ,
PASSWORD varchar(10) ,
SecretQuestion varchar(80) ,
SecretAnswer varchar(50) ,
UtilityCompanyID int(10) ,
SwUpgrade int(10) DEFAULT 1,
DateToSignIn timestamp DEFAULT 0000 -00 -0000 :00 :00 NOT NULL ,
LastLoginTime timestamp DEFAULT 0000 -00 -0000 :00 :00 NOT NULL ,
STATUS varchar(20) DEFAULT 'Inacitve',
Email1 varchar(60) ,
Email2 varchar(60) ,
PoolID int(10) ,
DeviceID int(10) ,
Last_Modified_Timestamp timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL ,
PRIMARY KEY (CustID)
) ENGINE = InnoDB DEFAULT CHARSET = latin1;
phpMyAdmin的錯誤:
#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 '-00-00 00:00:00 NOT NULL,
LastLoginTime timestamp DEFAULT 0000-00-00 00:00:00 ' at line 18
任何想法,我可能是做錯了?
沒有檢查時間戳創建字段看起來不對 - 你確定這些工作? DateToSignIn時間戳DEFAULT 0000 -00 -0000:00:00 NOT NULL, LastLoginTime時間戳DEFAULT 0000 -00 -0000:00:00 NOT NULL, – 2012-01-06 05:30:47